faqts : Computers : Programming : Languages : Visual basic

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

21 of 22 people (95%) answered Yes
Recently 10 of 10 people (100%) answered Yes


How do you know if a variable is null?

Jun 10th, 2000 20:49
Jerry Yoakum,

Use the IsNull function.
A value of True will be returned if the variable's value is Null.
  Sub main()
    Dim x As Variant
    x = Null
    If IsNull(x) Then
        MsgBox "null"
    End If
  End Sub