Save data in template from a form. Please Help!

M

Myriam

I have a form with a list box and a text box.
The user will select from the list box1 (linked cell is Sheet2!C1) and will input text in text box1.
With command button, I need to open a workbook.xlt and copy that data to that Template1, Sheet2!C5 and Sheet!C6.
I am really at a loss.
Thanks for the help!
 
B

Bob Phillips

Myriam,

Just off the top

Workbooks.Open Filename:="C:\myTest\volker1.xls"
With Activeworkbook.Worksheets("Sheet2")
.Range("C5").Value = Userform1.Listbox1.Value
.Range("C6").Value = Userform1.Texdtbox1.Text
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Myriam said:
I have a form with a list box and a text box.
The user will select from the list box1 (linked cell is Sheet2!C1) and will input text in text box1.
With command button, I need to open a workbook.xlt and copy that data to
that Template1, Sheet2!C5 and Sheet!C6.
 
M

Myriam

Thanks! That's what I needed
Bob Phillips said:
Myriam,

Just off the top

Workbooks.Open Filename:="C:\myTest\volker1.xls"
With Activeworkbook.Worksheets("Sheet2")
.Range("C5").Value = Userform1.Listbox1.Value
.Range("C6").Value = Userform1.Texdtbox1.Text
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)


that Template1, Sheet2!C5 and Sheet!C6.
 
Top