Data type: – A data type used in visual basic to declare variable with a data type. Just like any other programming language, visual basic also provide data type. There are number of data type available in visual basic programming. A list of data type, description and bytes used in memory are as follows.

Visual basic data types: –


Data Type Description Amount of memory
Boolean Used to hold the values  true or false 2 bytes
Byte Hold a small number in the range 0 through 255 1 bytes
Currency Stores numbers with up to 15 digits to the left of the decimal point, and up to 4 digits to the right of the decimal point. It’s called “Currency” because math operations on variables of this data type are very accurate and suitable for calculations involving money 8 bytes
Date Stores date and time information 8 bytes
Double Holds double-precisian floating-point number, rounded to 14 digits of accuracy 8 bytes
Integer Used to store whole numbers in the range of -32,768 to +32,767 2 bytes
Long Used to store whole numbers in the range of approximately -2 billion to +2b billion 4 bytes
Single Holds single-precision floating-point number, rounded to 6 digits of accuracy 4 bytes
String Holds strings, which may consist of letters, numbers, punctuation symbols, etc. Depends on the number of characters 1
Variant Can store  any type of information Depends on the value  stored 2