VarType Property

Object List Next Object

Defined By:
OleVariant

Description:

Displays the type of the Variant.

Details:

VarType gives a number representing the type the variant is using. Setting VarType on a empty(Void) Variant will make the Variant be that type. Setting VarType on a non-emtpy Variant will attempt to convert the Variant to the indicated type. Failure to convert will throw an exception. Note: setting a empty Variant to BSTR (VarType=8) will NOT allocate a binary string. Instead, set Size or WideSize. Likewise, setting the BYREF bit in VarType will NOT allocate data or create a valid pointer.

Data Type: Integer