Sending text from a Text box to a sheet

  • Thread starter Thread starter morry
  • Start date Start date
M

morry

I have a form with a text box and a command button on it. I have
a button on the worksheet that makes this form pop up. I want to b
able to type text into the box and send it (by hitting the comman
button) to a different sheet in the same workbook and place it in
specific cell.

If someone could help me with this that would be great.

Thanks
Morr
 
Morry,

In the Click event of the command button, use code like

Worksheets("Sheet2").Range("A1").Value = _
Me.TextBox1.Text


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Thanks Chip that works.
But now I'm having trouble hiding the form. The code I put in is:
Form.hide

but it tells me: Must close or hide topmost modal form first
I only have one form and the only code in it is the code you gave me.
I have a button on Sheet1 that has the code: Form.Show but i don't kno
what it wants me to close.

Any Suggestion?

Thank you
Morr
 
morry said:
Thanks Chip that works.
But now I'm having trouble hiding the form. The code I put in is:
Form.hide

but it tells me: Must close or hide topmost modal form first
I only have one form and the only code in it is the code you gave me.
I have a button on Sheet1 that has the code: Form.Show but i don't know
what it wants me to close.

Any Suggestion?

Thank you
Morry

Try using the command Unload Userform1 instead of Form.hide

HTH
Charles
 
Try using

Me.hide

if the instruction is in the code associated with the userform.
 
Back
Top