IsEmpty - Built-in Miscellaneous Function¶
Purpose¶
Returns a boolean indicating if the expression is empty. The function can be used to determine if a variable is a declared variable for which no value has been assigned.
Syntax¶
IsEmpty(exp)
Arguments¶
| Argument | Required | Description |
|---|---|---|
exp |
Yes | Any valid expression |
Returns¶
Variant with a boolean (VT_BOOL) value
Example¶
Dim sTest
Return IsEmpty(sTest)
The above returns true as no value has been assigned to the variable.
Notes¶
- Empty is different from an empty string or numeric zero value. Check these situations with Len and <>.
- Technically, the function returns true when the variant variable equals VT_EMPTY.
- The return value conforms to the standards for variant datatypes