ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Passing Text from User Form to Spreadsheet (https://www.excelbanter.com/excel-programming/273639-passing-text-user-form-spreadsheet.html)

Betsy[_2_]

Passing Text from User Form to Spreadsheet
 
How do I pass the values entered in a text box on a user
form to a cell in the spreadsheet?

Thanks.

Betsy

Tom Ogilvy

Passing Text from User Form to Spreadsheet
 
One way is to set the control source property to the cell

Sheet1!A1

Another way is to run code that writes the value

Private Sub Cmd_OK_Click()
Worksheets("Sheet1").Range("A1").Value = Textbox1.Text
unload me
End Sub

--
Regards,
Tom Ogilvy



Betsy wrote in message
...
How do I pass the values entered in a text box on a user
form to a cell in the spreadsheet?

Thanks.

Betsy





All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com