Integer Data Type for Visual Basic 6.0 Users
In Visual Basic 2008, the integer data types differ from those in Visual Basic 6.0. These changes were made for interoperability with other programming languages and with the common language runtime.
The following table shows correspondences between integer types in Visual Basic 6.0 and Visual Basic 2008.
Visual Basic 6.0 type and identifier type character
Visual Basic 2008 type and identifier type character
Common language runtime (CLR) type
8 bits, signed
8 bits, unsigned
16 bits, signed
16 bits, unsigned
32 bits, signed
32 bits, unsigned
64 bits, signed
64 bits, unsigned
On 32-bit systems, 32-bit integer operations are faster than either 16-bit or 64-bit integer operations. This means that in Visual Basic 2008, Integer and UInteger are the most efficient and fundamental numeric types. You can improve performance in your applications by changing your Long declarations to Integer when you migrate to Visual Basic 2008.
If you are interfacing with components created on platforms other than Visual Basic 2008, you must make sure that your data types correspond to those of the other components. For example, if you use a Declare statement to refer to an external procedure created in Visual Basic 6.0, and the procedure defines an Integer argument (two bytes in Visual Basic 6.0), you must identify that argument as Short in the Declare statement, because that is the two-byte integer type in Visual Basic 2008.