Enum VBVarType
MS-VBAL 6.1.1.16 VbVarType — the COM Automation VARENUM tag space a
Variant value carries. These are the same numeric values the VarType() standard
library function reports and that OLE Automation marshals a VARIANT against, so RD-VBA's own
VBVariantValue stays shaped correctly for COM
interop even where a real host/marshalling layer doesn't exist yet.
[StdLibEnum(null)]
public enum VBVarType
Fields
VBArray = 8192Combined (bitwise-or'd) with the element type's own VBVarType: the VBVariantValue subtype is an array whose element type is that combined tag (MS-VBAL 6.1.1.16: "Any Array type: 8192 + VarType of element's type").
VBBoolean = 11The VBVariantValue subtype is VBBooleanType.
VBByte = 17The VBVariantValue subtype is VBByteType.
VBCurrency = 6The VBVariantValue subtype is VBCurrencyType.
VBDataObject = 13The VBVariantValue subtype is VBObjectType — COM's own
VT_UNKNOWN: an early-bound (IUnknown-only, non-Automation) object reference. RD-VBA does not yet distinguish this from VBObject; nothing constructs this value today.VBDate = 7The VBVariantValue subtype is VBDateType.
VBDecimal = 14The VBVariantValue subtype is VBDecimalType.
VBDouble = 5The VBVariantValue subtype is VBDoubleType.
VBEmpty = 0The VBVariantValue subtype is VBEmptyType.
VBError = 10The VBVariantValue subtype is VBErrorType — also the subtype of the
Missingdata value an omittedVariantargument carries (DISP_E_PARAMNOTFOUNDin the underlying COM representation).VBInteger = 2The VBVariantValue subtype is VBIntegerType.
VBLong = 3The VBVariantValue subtype is VBLongType.
VBLongLong = 20The VBVariantValue subtype is VBLongLongType (and, on a 64-bit host, VBLongPtrType_x64).
👉 This value is statically undefined in a 32-bit environment.
VBNull = 1The VBVariantValue subtype is VBNullType.
VBObject = 9The VBVariantValue subtype is VBObjectType — COM's own
VT_DISPATCH: a late-bound Automation object reference (anIDispatch*in the underlying COM representation).VBSingle = 4The VBVariantValue subtype is VBSingleType.
VBString = 8The VBVariantValue subtype is VBStringType (a
BSTRin the underlying COM representation).VBUserDefinedType = 36The VBVariantValue subtype is a VBUserDefinedTypeValue.
VBVariant = 12The VBVariantValue subtype is VBVariantType.
👉 Variant unwrapping can get really funky.