Hey,
Im in big need of getting this one solved, so hope someone can help me.
As is easier seen in the attachment, I set my variable myName to be the Combobox1.Value
I want this value to stick with the variable, so that when I activate Sheet2, myName still equals whatever I was set to in the userform. This is not the case though, since variable value is empty when I activate another sheet. Guess it has something to do with my declaration of the variable, but cant figure it out. Please help
Thanks in advance!!
Public myName As String
Private Sub CommandButton1_Click()
myName = ComboBox1.Value
MsgBox "nyName now equals " & myName & vbNewLine & vbNewLine & "Try activate Sheet2 now"
Worksheets(1).Range("a1").Value = myName
Unload Me
End Sub
Bookmarks