Declaring a string as a global value

M

Matt

I have a form that sets a string value. I want this value to be available in
other forms and not changed. An example would be Form 1 asks the user for
the state. After the user enters the state, the user opens other forms that
all contain the state value selected as a Text Box label.

Matt
 
R

Rosco

Create a new standard module

Type in the module :
Public strMyString as string (sub your variable name for strMyString)

in the declarations space.

Remember, this is now a public variable and what ever value is assigned in
the last procedure using it holds until you explicitly redefine the variable.
Rosco
 
Top