Miscellaneous Data Types (Visual Basic)

Visual Basic supplies several data types that are not oriented toward numbers or characters. Instead, they deal with specialized data such as yes/no values, date/time values, and object addresses.

For a table showing a side-by-side comparison of the Visual Basic data types, see Data Type Summary (Visual Basic).

The Boolean Data Type (Visual Basic) is an unsigned value that is interpreted as either True or False. Its data width depends on the implementing platform. If a variable can contain only two-state values such as true/false, yes/no, or on/off, declare it as Boolean.

The Date Data Type (Visual Basic) is a 64-bit value that holds both date and time information. Each increment represents 100 nanoseconds of elapsed time since the beginning (12:00 AM) of January 1 of the year 1 in the Gregorian calendar. If a variable can contain a date value, a time value, or both, declare it as Date.

The Object Data Type is a 32-bit address that points to an object instance within your application or in some other application. An Object variable can refer to any object your application recognizes, or to data of any data type. If a variable stores a pointer to an instance of a class that you do not know at compile time, or if it can point to data of various data types, declare it as Object.

Community Additions