Declaring a string as a global value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top