skorpionkz
Well-known Member
- Joined
- Oct 1, 2013
- Messages
- 1,171
- Office Version
- 2016
Hi guys,
I have code with about 10 modules (each has different number of Sub procedures and lots of variables).
One of the modules has Launcher code which call other procedures.
It all works ok for most users on their laptops, but now I have 1 user (and bad luck that this user is my manager) who has strange things happening on his laptop with my code.
The code does not clear the variables after it finishes the work.
Example, if I have variable "lBisRow" that check if string (let say Product) exist and if so then take row number of it.
then next time User run the code again, and there is no Product String the "lBisRow" still will have value instead of being empty.
Is there is a way to clear all variables before End Sub?
I have code with about 10 modules (each has different number of Sub procedures and lots of variables).
One of the modules has Launcher code which call other procedures.
It all works ok for most users on their laptops, but now I have 1 user (and bad luck that this user is my manager) who has strange things happening on his laptop with my code.
The code does not clear the variables after it finishes the work.
Example, if I have variable "lBisRow" that check if string (let say Product) exist and if so then take row number of it.
then next time User run the code again, and there is no Product String the "lBisRow" still will have value instead of being empty.
Is there is a way to clear all variables before End Sub?