variable

  • Thread starter Thread starter Joel
  • Start date Start date
J

Joel

I want to create a global variable that I can toggle from
0 to 1 with If statements. Is this how to define it at
the top:?

Const olForrmOpen = 0

and can I change it in an If statement simply by doing
this:?

if olForrmOpen = 0 then
Const olForrmOpen = 1
end if

I think I have the syntax wrong.

Thank you
Joel
 
Constants cannot be changed once defined. Just use this above any functions
or subs in the form code:

Dim olForrmOpen

I'd use it as a Boolean and set it to True or False in the If block.
 
Back
Top