Question Locked

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

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

...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"

1 reply

This discussion is closed to new replies.