Help with VBA userform
Hello, so I am a student and I was asked to create a quiz for my IT project.
I wanted to add macros and so here is my problem.
When I click start, I want a user form to pop up and ask for the users name, and store the input in the variable UserId.
I have created the userform, and it works fine, but the variable doesn't seem to pick up what is written in the text box.
Here is my code for this specific section:
------------------------------------------------------------------------
Private Sub TextBox1_Change()
UserId = TextBox1.Text
End Sub
Private Sub ToggleButton1_Click()
MsgBox ("Thank you," & UserId)
End Sub
-------------------------------------------------------------------------
Currently, the Thank you, & user ID currently reads
Thank you,[BLANK]
Thanks in advance for any help
Kind regards, Benn
|