I am creating my first class and it will be possible for the Class Initialize event to fire twice.
Is there any way to check if the Class is already "loaded" (I'm not sure I'm using the right terminology here)?
I am creating my first class and it will be possible for the Class Initialize event to fire twice.
Is there any way to check if the Class is already "loaded" (I'm not sure I'm using the right terminology here)?
*******************************************************
HELP WANTED! (Links to Forum threads)
Trying to create reusable code for Custom Events at Workbook (not Application) level
*******************************************************
Is it possible to "unload" the class after its usage to avoid "double loading"?
Set "ClassName" = Nothing
Or, declare a public variable (e.g. KKK) that when the class is initialized first time, you give kkk a value (e.g. 999). then, before trying to re-initialize it, check the value of kkk: if it is 999, do not initialize, else, initialize.
Does it make sense?
Click on the star if you think I helped you
thanks for the +
if you find a method to check whether the class has already been initialized, post it here. we all learn something new every day
As a class must be 'loaded' into an object (as far as I understand, although happy to be corrected), could you use:
Please Login or Register to view this content.
Did it work?
What did you actually try as code - I assume you didn't use Object as a variable.
A class is not an object - an instance of a class is. Typically you would store this in a variable which you can indeed test to see if it's Nothing.
Remember what the dormouse said
Feed your head
Hi Rory, Class is unknown territory to me.
Below is what I tried.
Please Login or Register to view this content.
You need Is Nothing, not = Nothing.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks