0
There’s an easier way than writing
x = UserForm1.textbox2.value
?
That instruction means: Copy the value of the Userform1 textbox.
I wanted to replace the "Userform1" statement with something that means "Open Userform".
i.e.: copy the value of the text box 1 of the "Open Userform".
If it is in vb6 try to expose a
Property Get
to consume the value of your control this would be a more elegant way. Another point create instances of forms this will reduce the number of failures in your application, because accessing the form directly will not be downloaded.– davidterra
If you omit Userform the VBA will already use the Active Form, so with
textbox2.value
it already performs in the userform texbox2. Already if you want in the active textbox you can use the Class modules– danieltakeshi