Userdefined data types

A number of VBA ' built-in' data types such as Integer, Double and String have been introduced in this chapter. These are called base types. Sometimes these are not adequate. For example, suppose you wanted a data type to represent the actual days of the week, as names in an ordered list. Or what if you wanted a data type representing a record in a customer database? There are no base types in VBA that could be used directly to represent these data structures, but it is possible for the programmer to create new data types describing them. These are known as user-defined data types. Once created, we can manipulate these user-defined types directly by creating variables, or constants, of that data type throughout the program for which it is defined.

0 0

Post a comment