Table of Contents

Enum DeclarationRole

Namespace
RDCore.SDK.Semantics
Assembly
RDCore.SDK.dll

What a member of a class module is there for, when it is not there on its own account.

public enum DeclarationRole

Fields

EntryPoint = 4

It is the procedure a run of the project starts with (ProgramEntryPoint): the procedure the project names, or the Sub Main of the one standard module that declares one. A run calls it, and the project's code need not. A library project has none.

EventHandler = 2

It handles an event, which calls it by its name:

  • an event of a WithEvents variable of the class module, or of a form's control, named VariableName_EventName (MS-VBAL §5.3.1.8);
  • an event of a form itself, named for the class its designer hosts (UserForm_Initialize, Form_Load);
  • the class's own Initialize or Terminate: a Class_Initialize or Class_Terminate subroutine with no parameters, of a class module that is not a form (MS-VBAL §5.3.1.10);
  • an event of a document module's host class, named for that class (Workbook_Open, Worksheet_Change), which the host application raises.
InterfaceImplementation = 1

It implements a member of an interface the class module Implements, by being named InterfaceName_MemberName (MS-VBAL §5.3.1.9).

None = 0

A member like any other, or one whose role the pass could not tell.

UnmatchedEventHandler = 3

It 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.