Enum Definition
Syntax
[ | Private | Public ] _ Enum name [ As type ] elem [ = value] [...] End Enum
Group
Description
Defines a new user enum. The optional type overrides the default Long element type. You can specify Byte, Integer, Long, SByte, Short, UInteger, ULong, or UShort.
Each elem defines an element of the enum. If value is given then that is the element value. The value can be any constant integer expression. If value is omitted, the element value is one more than the previous element value. If there is no previous element then zero is used.
Access
If no access is specified, Public is assumed.
Enum Days
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
End Enum
Sub Main
Dim D As Days
For D = Monday To Friday
Debug.Print D ' 0 through 4
Next D
End Sub