Akuini
Well-known Member
- Joined
- Feb 1, 2016
- Messages
- 4,983
- Office Version
- 365
- Platform
- Windows
Why 0 is considered 'Empty' in VBA?
I ran this macro:
Using IsEmpty(x) returns 'False' as I expected, but why x = Empty returns 'True'?
I ran this macro:
VBA Code:
Sub test1()
Dim x As Variant
x = 0
Debug.Print IsEmpty(x) 'returns False
Debug.Print x = Empty 'returns True
End Sub
Using IsEmpty(x) returns 'False' as I expected, but why x = Empty returns 'True'?