Returns a value indicating the subtype of a variable.
Arguments
The varname argument can be any variable.
Return Value
The VarType function returns the following values:
Constant
|
Value
|
Description
|
---|
vbEmpty | 0 | Empty (uninitialized) |
vbNull | 1 | Null (no valid data) |
vbInteger | 2 | Integer |
vbLong | 3 | Long integer |
vbSingle | 4 | Single-precision floating-point number |
vbDouble | 5 | Double-precision floating-point number |
vbCurrency | 6 | Currency |
vbDate | 7 | Date |
vbString | 8 | String |
vbObject | 9 | Automation object |
vbError | 10 | Error |
vbBoolean | 11 | Boolean |
vbVariant | 12 | Variant (used only with arrays of Variants) |
vbDataObject | 13 | A data-access object |
vbByte | 17 | Byte |
vbArray | 8192 | Array |
Note |
---|
These constants are specified by VBScript. As a result, the names can be used anywhere in your code in place of the actual values. |
Remarks
Requirements
See Also