JustinEzekiel proposed the correct solution: You shouldn't use the = sign to check if an object exists. In an If statement, you basically use the = as a comparison operator, but if the object doesn't exist, there is nothing to compare with...
A somewhat more structured way to put it, could be:
Select Case rstObjct Is Nothing
Case True
Case False
End Select
_________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.