Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static global varibale - where tu put it?
Hello,
I need to initialize a couple of objects on a sheet just once upon Sheet.Activate event; I'd use a bool varibale as a semaphor so that further inits would be prevented if a user returned to that sheet from another one and this semaphor would have been set to true. Now - where should I put this variable for it to retain its value throughout the 'lifetime' of the whole workbook? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static global varibale - where tu put it?
--These variables are to be dimensioned at the top of a module like
Public blnSheet1 as Boolean --For a clear picture on this refer the below link http://www.ozgrid.com/VBA/variable-scope-lifetime.htm -- Jacob "Mac" wrote: Hello, I need to initialize a couple of objects on a sheet just once upon Sheet.Activate event; I'd use a bool varibale as a semaphor so that further inits would be prevented if a user returned to that sheet from another one and this semaphor would have been set to true. Now - where should I put this variable for it to retain its value throughout the 'lifetime' of the whole workbook? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Static global varibale - where tu put it?
Use a Dim statement in a module or Class module out side any sub or function Dim A sub Test A = 5 end test -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=161663 Microsoft Office Help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Static variable | Excel Programming | |||
"Static" Behavior without Static Defn | Excel Programming | |||
Static Header Row | Excel Discussion (Misc queries) | |||
Static Row | New Users to Excel |