Declares enumeration.
Enum Name constName1 [ = value1 ] [constName2 [ = value2 ]] ... End Enum |
The Enum statement syntax has these parts:
Part | Description |
Enum | Required; keyword. |
constName1, constName2... | First is required. Names of the enumeration constants. |
value1, value2... | Optional. The enumeration constants values. |
Declaring enumerations is a quick way to declare several named constants. If their values are not assigned directly, they start from 0 and increase by 1 every next constName. If the value of a certain constant is set, next value will differ by 1.
Enum numbers zero ' = 0 five = 5 ' = 5 six ' = 6 End Enum |
See Also |
Const Statement |