Null Example

'This code does not work like you might expect
Dim varTest
varTest = Null
If varTest = Null Then
MsgBox "The variable has a Null value."
End If

You did not see any dialogue box pop up did you? That is because the expression If varTest = Null always returns False. If you want to know if a a variable contains a Null value, you must use the IsNull ( ) function:

If IsNull(varTest) = True Then
MsgBox "The variable has a Null value."
End If

First
Next