Mega Code Archive

 
Categories / VisualBasic Script / Data Type Functions
 

Test a Variant variable to see whether it has the Empty value

Sub EmptyVar()     Dim vntName As Variant     Debug.Print IsEmpty(vntName) 'Prints True     vntName = ""     Debug.Print IsEmpty(vntName) 'Prints False     vntName = Empty     Debug.Print IsEmpty(vntName) 'Prints True End Sub