variable

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

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

Top