isNothing() function is not in the <All Libraries> <globals> list. Getting Compile error. Any ideas?
Dec 27th, 2003 07:26
Gary Winey, Tim Brown, Alex R,
isNothing() isn't a function (in VB6 at least)
try the expression:
X Is Nothing
Like you, I tend to forget there is no intrinsic IsNothing function so
I wrote my own as below:
Public Function IsNothing(pvar As Variant) As Boolean
On Error Resume Next
IsNothing = (pvar Is Nothing)
On Error GoTo 0
The reason I relied entirely on error checking instead of using
IsObject, etc. is because IsNothing(Nothing) needs to return True.