I've been coding in Excel VBA for a while, but am fairly new to using Class Modules.
One of the classes I have created depends on another user-defined class that is defined in an add-in that only a few employees at my firm have. My issue is that whenever someone who doesn't have this add-in opens my workbook, Excel gives a VBA error because it can't find the class that is defined in the add-in they don't have.
I can't figure out why, when a user simply opens my workbook, Excel seems to read/execute my class module (when it executes the code looking for the add-in most users don't have). Does anyone know what events, specifically, would cause my class module to be read/executed?
In case it is relevant, I am currently instantiating this add-in specific class using a "Dim WithEvents" statement at the top of my class. I have tried moving this statement inside of the class's Intialize() method, thinking this would cause that line only to be executed when my class is actually instantiated, however, this gives a compiler error.
Any help would be much appreciated!
James
One of the classes I have created depends on another user-defined class that is defined in an add-in that only a few employees at my firm have. My issue is that whenever someone who doesn't have this add-in opens my workbook, Excel gives a VBA error because it can't find the class that is defined in the add-in they don't have.
I can't figure out why, when a user simply opens my workbook, Excel seems to read/execute my class module (when it executes the code looking for the add-in most users don't have). Does anyone know what events, specifically, would cause my class module to be read/executed?
In case it is relevant, I am currently instantiating this add-in specific class using a "Dim WithEvents" statement at the top of my class. I have tried moving this statement inside of the class's Intialize() method, thinking this would cause that line only to be executed when my class is actually instantiated, however, this gives a compiler error.
Any help would be much appreciated!
James