IsNull function

Category: Array / Information

Summary

True if expression is Null.

Syntax

IsNull(expression) The required expression argument is a Variant containing a numeric expression or a string expression.

Example

Example
This example uses the IsNull function to determine if a variable contains a Null.
Dim MyVar, MyCheck
MyCheck = IsNull(MyVar) ' Returns False.

MyVar = ""
MyCheck = IsNull(MyVar) ' Returns False.

MyVar = Null
MyCheck = IsNull(MyVar) ' Returns True.

Microsoft Support Page

https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/isnull-function

Back to Functions