Types of Variables : Variable Type « Language Basics « VBA / Excel / Access / Word






Types of Variables

 
Variable Type     Description
Boolean           True or False. 
Byte              It can only hold a single value between 0 and 255.
Currency          It holds a currency value with four decimal places, from -922,337,203,685,477.5808 to 922,337,203,685,477.5807.
Date              This stores both dates and time. Interestingly, the years range from 100 to 9999.
Double            Doubles are for very large numbers. The range runs from -4.940656458411247 * 10^-324 to 4.94065645841247 * 10^-324.
Integer           nteger handles the range of numbers -32,768 to 32,767.
Long              Long handles the number range -2,147,483,648 to 2,147,483,657.
Object            You can store an object as a variable for later use.
Single            This is the second decimal point type, the other being Double.
String            A String variable can hold up to 2 billion characters.

 








Related examples in the same category

1.Define an integer
2.Read integer number from InputBox
3.Define a string variable
4.Mix integer and string in MsgBox