How you test depends on the Property's DataType:
| 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 |
You can tell the DataType by pressing F2 to launch the Object Browser and looking up the Object. Another way would be to just use the TypeName function:MsgBox TypeName(obj.Property)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…