Enum DeclarationRole
What a member of a class module is there for, when it is not there on its own account.
public enum DeclarationRole
Fields
EventHandler = 2It handles an event of a
WithEventsvariable of the class module, by being namedVariableName_EventName(MS-VBAL §5.3.1.8).InterfaceImplementation = 1It implements a member of an interface the class module
Implements, by being namedInterfaceName_MemberName(MS-VBAL §5.3.1.9).None = 0A member like any other, or one whose role the pass could not tell.
UnmatchedEventHandler = 3It is named as the handler of an event of one of a form's controls (
TextBox1_Change), and does not match the event: it is not a subroutine, or its parameter list is not compatible with the event's. MS-VBA compiles it, and the event never calls it: it is dead code, unless the module's own code calls it as the procedure it also is.