r***@gmail.com
2005-05-29 21:53:00 UTC
Hi,
I have an Outlook addin written in VB6 that that is giving me an error
message box every time I close Outlook saying "Run-time error '424':
Object required.
It is code that I've inherited and have to fix, but I'm not sure what
is causing the problem. My investigation has led me to believe the
following might be causing it.
When the OnDisconnection event is called, two class variables of the
same type that were initialized at one point in the code are set to
Nothing. This invokes two calls to Class_Terminate. When
Class_Terminate is called for the first instance, it does the necessary
cleanup in the function and exits apporpriately. However when
Class_Terminate is called for the second variable, it never completes
it's cleanup because OnDisconnection reaches the end of the function
and exits the addin. And therefore I get the error message because the
objects are gone.
Does this seem plausible? Is there are way to ensure that the cleanup
routines can finish before the OnDisconnection exits (if this is the
problem)? Any suggestions?
Thanks.
I have an Outlook addin written in VB6 that that is giving me an error
message box every time I close Outlook saying "Run-time error '424':
Object required.
It is code that I've inherited and have to fix, but I'm not sure what
is causing the problem. My investigation has led me to believe the
following might be causing it.
When the OnDisconnection event is called, two class variables of the
same type that were initialized at one point in the code are set to
Nothing. This invokes two calls to Class_Terminate. When
Class_Terminate is called for the first instance, it does the necessary
cleanup in the function and exits apporpriately. However when
Class_Terminate is called for the second variable, it never completes
it's cleanup because OnDisconnection reaches the end of the function
and exits the addin. And therefore I get the error message because the
objects are gone.
Does this seem plausible? Is there are way to ensure that the cleanup
routines can finish before the OnDisconnection exits (if this is the
problem)? Any suggestions?
Thanks.