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

How to export data from forms to worksheets?

Status
Not open for further replies.

episode80

Technical User
Aug 17, 2004
13
FI
I think this is quite easy question but I'm a beginner so help me please...

So, I just want to export data from forms (for example from textboxes) to normal worksheet cells.

What is the code to do that in VB?

Thank you! :)
 
Easy ... [rednose]

If you textbox is named Text1[/red] and that you want to copy its content in the Cell(A1) of the first sheet of your current Workbook :
Code:
ThisWorkbook.Worksheets(1).Range("A1") = Text1.Text
Ditto if you have a ComboBox : use .Text

Rodie[2thumbsup]
 
Take a look at the ControlSource property of the textbox.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thank you for your help! You really saved my day! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top