VBAhole22
Registered User.
- Local time
- Today, 14:38
- Joined
- Jan 18, 2002
- Messages
- 117
I am writing because I need help. I am addicted to global variables. They litter my programming and I know they are bad but I can't avoid them. I need help to break free.
What I typically wind up having is a module with global declarations up top and then a sub below that I usually call InitializeVariables that sets the value of the globals (usually strings with paths to other data). Then in any other procedure that uses one of these globals I have to start by calling InitializeVariable to make sure the global is set.
I am sure this is bad form. I just can't find a better solution.
Is there any hope for a global junkie?
What I typically wind up having is a module with global declarations up top and then a sub below that I usually call InitializeVariables that sets the value of the globals (usually strings with paths to other data). Then in any other procedure that uses one of these globals I have to start by calling InitializeVariable to make sure the global is set.
I am sure this is bad form. I just can't find a better solution.
Is there any hope for a global junkie?