Empty

This keyword/value can only be used in conjunction with the Variant data type.
This keyword/value is used when a variable declared as Variant has not been assigned a value.
A variant variable has the Empty value prior to it being assigned a value.


Initialising a Variant

The Empty data type is the default value when you declare a variable as a Variant.


Empty = 0

The Empty keyword is also a zero value.
A variant containing Empty is 0 when used in a numerical context.


Empty = ""

The Empty keyword is also a zero length string
A variant containing Empty is a zero length string ("") when used in a string context.


Assigning Empty

The Empty data type can be assigned explicitly to a Variant data type to indicate that a variable does not contain a value.


IsEmpty Function

The ISEMPTY returns True or False indicating if a variable has been initialised


vbVarType.vbEmpty

If you assign a variable to vbEmpty then you are actually just assigning the numerical value zero.


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext