Working with Null : IsNull « Data Type Functions « VBA / Excel / Access / Word






Working with Null

 
Sub NullVar()
    Dim vntName As Variant
    Debug.Print IsEmpty(vntName) 'Prints True
    Debug.Print IsNull(vntName) 'Prints False
    vntName = Null
    Debug.Print IsNull(vntName) 'Prints True
End Sub

 








Related examples in the same category

1.If...Then...Else and IsNull
2.Loop through all of the records in the recordset for non-null value