Nathan, if you execute the statement:
End
all by itself to halt your macros, it resets all global varaibles. Also, vb
crashes tend to reset global variables.
When you say that you declared it a global variable, exactly what was the
declaration? Was the prefix "public" or "global"? It should be Public. I
have found that Global isn't always global.
Do you have "Option Explicit" set at the top of each module? This forces
variables to be declared and you may have a typo this will help catch.
If you have also declared the same variable as part of a procedure, that
declaration takes precedent over global declarations. So you may be seeing
a local variable versus the global one.
Lastly, what is telling you that it is reset? Have you tried putting a
breakpoint on the global variable, have it set so it is active in all
modules and all procedures, and breaks whenever the value changes? This
will trap when the value is set and when something else changes it.
Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel