global variable

  • Thread starter Thread starter dom
  • Start date Start date
D

dom

How am I set global variable on the main form which can be referred by
another from when the main form is still active.
 
It's easier to declare the global variable in a module, not in a form.

If for some reason, though, you feel you must declare it in the form, you
need to refer to the form as well as the variable to use it elsewhere. If
you've declared a variable gstrValue in form frmPublicVariable, you'd refer
to it as Form_frmPublicVariable.gstrValue
 
thanks


Douglas J. Steele said:
It's easier to declare the global variable in a module, not in a form.

If for some reason, though, you feel you must declare it in the form, you
need to refer to the form as well as the variable to use it elsewhere. If
you've declared a variable gstrValue in form frmPublicVariable, you'd
refer to it as Form_frmPublicVariable.gstrValue
 
Back
Top