Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

userform problem

Status
Not open for further replies.

cashmire

Programmer
Apr 29, 2004
8
FI
Hello!
Could someone pleasehelp me..
I would like to create a userform that pastes a value (that the user types into the textbox in the userform) in a specified cell in a specified sheet.
Is that possible?
Thank you,
Cashmire
 
Hi
Assuming you have a command button (CommandButton1) and a Text box (TextBox1) this will put whatever is in the text box into cell B2 of the second sheet of your book when you click the button

Code:
Private Sub CommandButton1_Click()
Worksheets(2).Range("B2") = Me.TextBox1.Value
End Sub

;-)

If a man says something and there are no women there to hear him, is he still wrong? [ponder]
The faqs ma'am, just the faqs. Get the best from these forums : faq222-2244
 
Simply set the ControlSource property of the TextBox to the destination cell address.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top