Enumerations
An enumeration is a collection of Long (Integer) data types that have fixed numeric values.
The underlying data type cannot be explicitly defined because all enumerations are defined with a Long data type.
Enumerations provide a way of categorising (or grouping) your symbolic constants into a defined structure.
Instead of these 3 individual lines of code:
You can group these constants as a single enumeration.
When you use an enumeration value in your code you should always specify the enumeration type as well.
These 2 lines of code all work, but the first one is the preferred syntax.
Built-in Enumerations
A lot of the built-in constants are grouped into enumerations which typically start with the characters vb.
There are a huge number of built-in enumerations that are used to categorise all the built-in constants.
It is often a lot easier to remember the symbolic constant names rather than the actual numeric values.
Using enumerations has the added benefit of enablying the Auto List Members feature to provide help.
There is a built-in enumeration called vbMsgBoxResult which can be used.
This built-in enumeration has been defined in the following way:
These 3 lines of code all work, but the first one is the preferred syntax.
Built-in Enumerations - Complete List
A list of built-in enumerations can be seen in the object browser
![]() |
Excel Enumerations - Complete List
Here is the Complete List of all the Excel enumerations.
Word Enumerations - Complete List
Here is the Complete List of all the Word enumerations.
PowerPoint Enumerations - Complete List
Here is the [[Complete List]] of all the PowerPoint enumerations.
Other Information
Not all the built-in enumerations have the "vb" or "mso" prefix.
Do user defined enumerations appear in the object browser ?
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopNext
