|
-
Dec 10th, 2009, 05:14 AM
#1
Thread Starter
Evil Genius
Cannot dispose an object!!?!?!?!
I'm using a 3rd party API (in this case Quality Center OTA incase its of interest) in an Excel VBA project, and creating an object from it (TDAPIOLELib.tdconnection, which is a class, retuning an object in the documentation).
I use a "If not (thisObject is nothing) Then" statement, before running some cleanup code. At this point, the code inside of this IF statement is correctly executed & "thisObject" is not nothing.
The end of this IF block, I try to use "Set thisObject = nothing" (at this point, in a watch window I can see a whole bunch of "not connected"-type statements against each of the object's properties, however the object still very much exists (I've tried a "?Connection is nothing" call in the immediate window and successfully got a "False" value returned).
As soon as this line is executed, I get a runtime error 438, object doesn't support this property or method! Little confused here and the last thing I want is to have any memory leaks or non-disposed objects floating around having been caused by my macro/code. Help please/any suggestions/explainations?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|