• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part VIII: Appendices > Creating Data Types

Creating Data Types

VBA enables you to create three categories of new data types: Enum types, classes, and custom types. In each case you must devise a new tag to describe the new data type that you have created.

Data Type Enum

Groups of constants for the data type Long should be combined in a single Enum type. Invent a new tag for the data type, append a c to it, and define the Enum constants with the tag. Because the name that is defined in the Enum line is represented in the object browser, you can use the base name to describe the abbreviation that is defined by the tag, as shown here:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint