nigelandrewfoster
Well-known Member
- Joined
- May 27, 2009
- Messages
- 747
Is there any way of declaring and setting the value of a global object variable so it keeps its value when the procedure ends? The system I'm developing runs separate macros according to the user's clicking on clip art, returning the user to Excel level after each one has run. As it stands, the moment the macro finishes, all the global object variables I have declared are cleared, so the next click generates an "Object variable or With block not set" error. I have gotten around this by writing a macro which simply contains SET statements for them all, and each macro then starts with a CALL command to this macro. Is that the correct way to go, or is there a more direct way, please? As ever, I appreciate your time!
Nigel
Nigel