Help. I am trying to paste from userform to specified cells in ws... - TechRepublic
Question
October 23, 2008 at 03:47 AM
simon.c.l

Help. I am trying to paste from userform to specified cells in ws…

by simon.c.l . Updated 17 years, 9 months ago

…but this does not work. Also I would like to then hide the form so that the worksheet is editable but don’t know how to do this. Any ideas would be appreciated.

Here is the code:

Dim add_date As Variant
Set add_date = Now

Dim ws As Worksheet
Set ws = (“Sheet1”)

Workbooks.Open “myworkbook”

ws.Cells(“D84”).Value = fform.txt1
ws.Cells(“A81”).Value = fform.txt2
ws.Cells(“D81”).Value = fform.txt3
ws.Cells(“A86”).Value = fform.txt4
ws.Cells(“C51”).Value = add_date
ws.Cells(“C51”).NumberFormat = “dd/mm/yyyy”

This discussion is locked

All Comments