Working with Empty and Null : IsEmpty « Data Type Functions « VBA / Excel / Access / Word






Working with Empty and Null

 
Sub StringVar()
    Dim strName As String
    Debug.Print IsEmpty(strName) 'Prints False
    Debug.Print strName = "" 'Prints True
End Sub

 








Related examples in the same category

1.Using the ISEMPTY Function to Check Whether a Cell Is Empty
2.Test a Variant variable to see whether it has the Empty value