Results 1 to 2 of 2
Thread: Persistent Variable
2001-06-12, 15:57 #1JustCallMeAlGuest
I inherited the system I am working on. In it, the old programmer explicitely declared variables in multiple places. And I have no reason why this was done. I just have to work with it until I can make a major revision to the system.
Therefore, when you look in each person's normal.dot, you see the variable declared (the below variable name is just for the sake of this example):
Then in our main template that drives our system, the same variable is again declared:
The value of that variable, as most variables do, makes a significant impact on the operation of the system. The value of that variable is assigned from a user's choice on a UserForm.
Late yesterday, I received a call from a user who complained of a particular procedure not working. When I watched as she attempted to run it again, the product seemed to point to a persistent value in strMyVariable from a previous use of our system.
So, my question is this: Since the variable is explicitely defined in the normal.dot and in the module for the UserForm which provides the value for the form, can the value assigned to strMyVariable persist after the UserForm is finished and Set UserForm = Nothing?
2001-06-12, 19:53 #2
- Join Date
- Jan 2001
- Sun Prairie, Wisconsin, Wisconsin, USA
- Thanked 113 Times in 110 Posts
Re: Persistent Variable
Writing from theory (rather than experience or knowledge)...
If the variable is declared in Normal.dot, won't it persist as long as Normal.dot is running? Do all projects have an implicit reference to Normal.dot?Charles Kyle Kenyon