Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Question about variable scope
Was caught out with the following:
..xla add-in with a public Boolean variable declared in a normal module. This public variable is set by running a Sub in another normal module on opening the add-in, so this Sub was run from Private Sub Workbook_Open() This public variable got set fine to True, but by the time it was needed in another normal module it had reset to False. Is this normal behaviour because the Public declaration happens after the Workbook Open event? But then if this is the case why is there no error when the variable gets set in the Sub that runs on the Workbook Open event? Thanks for any insight in this. RBS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
variable scope | Excel Programming | |||
Variable Scope | Excel Programming | |||
Variable scope | Excel Programming | |||
Variable scope question w/combo-box, 2ND try | Excel Programming | |||
Variable scope question w/combo-box | Excel Programming |