|
|
Title | Tell whether a Variant variable is Empty |
Description | This example shows how to tell whether a Variant variable is Empty in Visual Basic 6 by using the IsEmpty statement. |
Keywords | Variant, Empty, variable |
Categories | Tips and Tricks |
|
|
Use the IsEmpty statement to see if the variable is Empty. If it is not, then you can use TypeOf and other operations to see what it contains.
|
|
Private Sub TellIfEmpty(ByVal var As Variant)
If IsEmpty(var) Then
MsgBox "Empty"
Else
MsgBox "Not Empty"
End If
End Sub
|
|
|
|
|
|