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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert a textbox value into a cell in a worksheet

Status
Not open for further replies.

BeginnerProgrammer

Technical User
Aug 2, 2002
33
US
Can someone tell me how to populate a cell in a worksheet with the value of a textbox on another worksheet in the same excel spreadsheet? Any help would be greatly appreciated.

Thanks
 
worksheets("Target Worksheet").range("A1").value = worksheets("source Worksheet").textboxname.text

Add the textbox from the controls toolbox and place the above code into the Lost Focus event. Eg:

Private Sub TextBox1_LostFocus()
Worksheets(1).Range("A1").Value = Worksheets(2).TextBox1.Text
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top