Conditionally Set an Object Variable = Nothing

Dugantrain

I Love Pants
Local time
Today, 11:32
Joined
Mar 28, 2002
Messages
221
Hi all,
I'm trying to release my objects in an error-handler, but only if they've been set to something. I'm trying
Code:
    If Not filesys = Nothing Then
        Set filesys = Nothing
    End If
but it's not working. Anyone know?
 
Try this:
Code:
    If Not (filesys Is Nothing) Then
        Set filesys = Nothing
    End If
 
Thank you.
 

Users who are viewing this thread

Back
Top Bottom