VBA's Built-in Data Types
Data Type |
Bytes Used |
Range of Values |
Boolean |
2 |
true or False |
Integer |
2 |
-32,768 to 32767 |
Long |
4 |
-2,147,483,648 to
2,147,483,647 |
Single |
4 |
-3.402823E38 to
1.401298E45 |
Double (negative) |
8 |
-1.79769313486232E308 to
-4.94065645841247E-324 |
Double (positive) |
8 |
4.94065645841247E-324 to
1.79769313486232E308 |
Currency |
8 |
-922,337,203,685,477.5808 to
922,337,203,685,477.5807 |
Date |
8 |
1/1/100 to 12/31/9999 |
String |
1 per character |
Varies according to the number of characters |
Object |
4 |
Any defined object |
Variant |
Varies |
Any data type |
Used defined |
Varies |
Varies |