Variables to be use by different Sub
Declare a public variable in a standard code module, set that variable to
the textbox1 value in the first userform, then access it from anywhere else,
even if the first userform is closed.
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Learn-more" wrote in message
...
In one Userform I had 2 Command Button calling 2 different Sub.
The first Sub will get input from Text Box and then store in cell A3,
eg Range("A3") = txtVal1.Text
How can I use the last txtVal1 and use it in the second Sub which was
called
from another Command Button and under a second Userform.
Basically, I could not work out where and how I can declare the variable
so
it can be use commonly in differen Sub in different Userform etc.
Thanks for helping.
Learn-more
|