rob0923
09-21-2009, 06:24 AM
Hi,
I have a user form with two text fields that I do not want to be entered into a spreadsheet, but I want what is entered from the text boxes to be transferred into a variable for vba to use.
I am wondering how to assign the textboxes to variables.
Can I use this
Private sub click_ok(var1 as string, var2 as string)
textbox1.text = Var1
textbox2.text = Var2
End Sub
However this is in the the user form area and I will need to have this transfer to the vba.
Thanks in advance!
I have a user form with two text fields that I do not want to be entered into a spreadsheet, but I want what is entered from the text boxes to be transferred into a variable for vba to use.
I am wondering how to assign the textboxes to variables.
Can I use this
Private sub click_ok(var1 as string, var2 as string)
textbox1.text = Var1
textbox2.text = Var2
End Sub
However this is in the the user form area and I will need to have this transfer to the vba.
Thanks in advance!