This documentation is archived and is not being maintained.

VariantType Enumeration

When you call the VarType function, you can use enumeration members in your code in place of the actual values.

The VariantType enumeration defines constants used to identify possible Variant types. The following table lists the VariantType enumeration members.

Member Constant Description
VariantType.Array vbArray Array.
VariantType.Boolean vbBoolean Boolean. (True or False.)
VariantType.Byte vbByte Byte. (0 through 255.)
VariantType.Char vbChar Char. (0 through 65535.)
VariantType.Currency vbCurrency Currency.
VariantType.DataObject   DataObject.
VariantType.Date vbDate Date. (0:00:00 on January 1, 0001 through 11:59:59 PM on December 31, 9999.)
VariantType.Decimal vbDecimal Decimal. (0 through +/-79,228,162,514,264,337,593,543,950,335 with no decimal point; 0 through +/-7.9228162514264337593543950335 with 28 places to the right of the decimal; smallest non-zero number is +/-0.0000000000000000000000000001.)
VariantType.Double vbDouble Double. (-1.79769313486231E+308 through
-4.94065645841247E-324 for negative values; 4.94065645841247E-324 through 1.79769313486231E+308 for positive values.)
VariantType.Empty vbEmpty Null reference.
VariantType.Integer vbInteger Integer. (-2,147,483,648 through 2,147,483,647.)
VariantType.Long vbLong Long. (-9,223,372,036,854,775,808 through 9,223,372,036,854,775,807.)
VariantType.Null vbNull Null object.
VariantType.Object vbObject Any type can be stored in a variable of type Object.
VariantType.Short   Short. (-32,768 through 32,767.)
VariantType.Single vbSingle Single. (-3.402823E+38 through -1.401298E-45 for negative values; 1.401298E-45 through 3.402823E+38 for positive values.)
VariantType.String vbString String. (0 to approximately 2 billion Unicode characters.)
VariantType.UserDefinedType vbUserDefinedType User-defined type. Each member of the structure has a range determined by its data type and independent of the ranges of the other members.
VariantType.Variant vbVariant Variant.

Smart Device Developer Notes

This enumeration is not supported.


Namespace: Microsoft.VisualBasic

Assembly: Microsoft.VisualBasic .NET Runtime (in Microsoft.VisualBasic.dll)

See Also

Intrinsic Constants and Enumerations | VarType Function