Name
Class Statement
Syntax
Class name 'statements End Class
nameUse: Required
Data Type: n/a
The name of the class
Description
Defines a class and delimits the statements that define that class’s member variables, properties, and methods.
Rules at a Glance
namefollows standard Visual Basic variable naming conventions.statementscan consist of the following:Private variable definitions. These variables are accessible within the class but not outside it.
Public variable definitions. (If variables are declared using the
Dimkeyword without an explicit indication of their accessibility, they are Public by default.) These variables become public properties of the class.Public functions and subroutines defined with the
Function...EndFunctionorSub...End Substatements. The scope of routines not explicitly defined by thePublicorPrivatekeywords is public by default. These routines become the public methods of the class.Private function and subroutines defined with the
Function...EndFunctionorSub...End Substatements. They are visible within theClass...End Classcode block, but not to code outside the class.Public properties defined using the
Property Let,Property Get, andProperty Setstatements. Properties defined without an explicitPublicorPrivatestatement are also Public by default. They, along with any public variables, form the public properties of the class.Private properties defined using the
PropertyLet,PropertyGet, andPropertySetstatements. They are visible within ...