DIAdem Help

Method: IsNull for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: IsNull for VBS

Specifies whether an expression contains invalid values (Null)

vIsNull = Object.IsNull(expression)
ObjectVBS
Object with this method. You do not need to specify this object.
expressionVariant
Specifies any expression.
vIsNullVariant
The IsNull method returns True if the expression contains invalid data. Otherwise the method returns False.
In contrast to the value Null, the value Empty indicates that a variable has not yet been initialized.

The following example checks whether a variable contains invalid values:

Dim MyVar
Call MsgBox(IsNull(MyVar)) 'Returns False
MyVar = Null
Call MsgBox(IsNull(MyVar)) 'Returns True
MyVar = Empty
Call MsgBox(IsNull(MyVar)) 'Returns False
Set MyVar = Nothing
Call MsgBox(IsNull(MyVar)) 'Returns False

See Also

Objects Overview

Related Topics

IsArray | IsDate | IsEmpty | IsNull | IsNumeric | IsObject | TypeName | VarType

Log in to get a better experience