Hello
I am creating a userform with a series of steps and command buttons. I want users to enter text for an ID # in the first pop-up (UserForm2). When they click NEXT (CommandButton1), I want the text/ID#(TextBox1, TextBox2,...TextBox6) to transfer into a label field (Label10,Label11,...Label15) in the next pop-up(UserForm1).
I have also written code for the TextBox values to populate in a database worksheet so that I can refer to those values later.
Can I write the code to transfer the text to the label in the same macro for CommandButton1?
Here is the code for clicking NEXT(CommandButton1):
Private Sub CommandButton1_Click()
Worksheets("Sheet2").Range("A2") = UserForm2.TextBox1.Value
Worksheets("Sheet2").Range("A3") = UserForm2.TextBox2.Value
Worksheets("Sheet2").Range("A4") = UserForm2.TextBox3.Value
Worksheets("Sheet2").Range("A5") = UserForm2.TextBox4.Value
Worksheets("Sheet2").Range("A6") = UserForm2.TextBox5.Value
Worksheets("Sheet2").Range("A7") = UserForm2.TextBox6.Value
UserForm2.Hide
UserForm1.Show
End Sub
Bookmarks