Returns a Boolean value indicating whether a variable has been initialized.


   expression    Any expression. However, because IsEmpty() is used to determine if
                 variables are initialized, this is most often a variable name.

IsEmpty returns True if the variable is uninitialized, or is explicitly set to Empty; otherwise, it returns False. False is always returned if expression contains more than one variable.


Test whether a variable has been initialized:

Dim MyVar, MyCheck

MyCheck = IsEmpty(MyVar) ' Returns True.

MyVar = Null
MyCheck = IsEmpty(MyVar)
' Returns False.

MyVar = Empty
MyCheck = IsEmpty(MyVar)
' Returns True.

“I have no money, no resources, no hopes. I am the happiest man alive” ~ Henry Miller

Related VBScript commands

Syntax - IsBlank function to detect Empty or NULL or Zero.

Copyright © 1999-2024
Some rights reserved