Using a string globally

andwelch

New Member
Joined
Jun 23, 2005
Messages
20
I'm trying to use a password between two different user forms. How can I use the password value globally? I tried using "public password as string" before the user form code and I tried public function user forms instead of private. Can this be done with user forms?
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,853
Hi

Declare the string as public in a standard module, not in a userform module. This should allow you to use the string in the userforms (as well as elsewhere).
 

Watch MrExcel Video

Forum statistics

Threads
1,109,487
Messages
5,529,162
Members
409,851
Latest member
Ingar
Top