Cell

G

Glenn

Hi,

I am trying to program a macro that will take what has
been entered in a textbox on a user form and place it in
cell A3.

Can anybody help please
Thanks
 
J

Jason Morin

Try something like:

Sub Test()
Dim cell As Range
Set cell = Sheets("Sheet1").Range("A1")
cell = UserForm1.TextBox1.Value
End Sub

HTH
Jason
Atlanta, GA
 
B

Bob Phillips

Worksheets("Sheet1").Range("A3").Value = Textbox1.Text

--

HTH

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

Bob Phillips

Should state that this is if the code is in the userform, if not precede the
Textbox with userform name and dot

Worksheets("Sheet1").Range("A3").Value = Userform1.Textbox1.Text

--

HTH

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

Guest

If i have a spreadsheet which the path is :-
H:\temp\test1.xls
I want my userform information which is on a different
spreadsheet to fill into the spreadsheet above, how would
i put that.

thanks
 
B

Bob Phillips

Add the workbook details to the code posted.

--

HTH

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

Guest

Workbook("H:\test1.xls").Worksheets("Sheet1").Range
("A1").Value = txtdate.Text

This is what i've got but it's not working.
aaaahhh. as you can tell i'm still learning !!!!
 
B

Bob Phillips

It's Workbooks not Workbook, part of a collection .

--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top