Welcome to FreeSoftwareServers Confluence Wiki



If Not VAR Is Nothing Then `VAR .Find Evals to "NOTHING" if Nothing found, not "NULL"

https://stackoverflow.com/questions/3329110/vba-check-if-variable-is-empty


| Type                                 | Test                            | Test2
| Numeric (Long, Integer, Double etc.) | If obj.Property = 0 Then        | 
| Boolen (True/False)                  | If Not obj.Property Then        | If obj.Property = False Then
| Object                               | If obj.Property Is Nothing Then |
| String                               | If obj.Property = "" Then       | If LenB(obj.Property) = 0 Then
| Variant                              | If obj.Property = Empty Then    |
  • No labels