Passing Text from User Form to Spreadsheet

  • Thread starter Thread starter Betsy
  • Start date Start date
B

Betsy

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

Thanks.

Betsy
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top