Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleTell whether a Variant variable is Empty
DescriptionThis example shows how to tell whether a Variant variable is Empty in Visual Basic 6 by using the IsEmpty statement.
KeywordsVariant, Empty, variable
CategoriesTips 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
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated