Debug Nothing Keyword

Test 1: Check Against Nothing

IsObject(objShell) = True

TypeName(objShell) = Object

objShell Is Nothing = False

objShell Is Not Nothing = True

Test 2: Undefined Variable Against Nothing

undefinedVar Is Nothing =

Err.Number (after undefinedVar Is Nothing) = -2146828275

Err.Description = Type mismatch

undefinedVar Is Not Nothing =

Err.Number (after undefinedVar Is Not Nothing) = -2146828275

Err.Description = Type mismatch

Test 3: Null value

nullVal = Null

nullVal Is Nothing =

Err.Number (after nullVal Is Nothing) = -2146828275

Err.Description = Type mismatch

nullVal Is Not Nothing =

Err.Number (after nullVal Is Not Nothing) = -2146828275

Err.Description = Type mismatch