Hello Bhimasena,
From your post, my understanding on this issue is: your excel.exe is not
terminated when you close the Excel, due to a event handler in your add-in.
You have already tried the method: ReleaseComObject and followed the kb
article:
http://support.microsoft.com/kb/317109, but it did not help. If
I'm off base, please feel free to let me know.
Because you said that the add-in runs well for Word, would you let me know
whether the event handler also runs in Word? What is that event handler
for? Would you send me some sample codes so that I can reproduce the issue
on my side?
Besides, based on my experience, my guess is that :
1. a circular reference of objects result in your problem. For instance,
your Application object has a reference to a delegate holding a reference
to the event handler, and the event handler also has a field which can
optionally point back to the Application object. Such a circular reference
may cause that the Application object cannot be released even if you call
ReleaseComObject. Please check it and let me know if there does exist a
circular reference in your code.
2. some additional references are created in your event handler but you do
not notice them. For instance,
oBook = oExcel.Workbooks.Add() will create an additional reference to
Excel.Workbooks object. Thus it should be modified as
dim oBooks as Excel.Workbooks
oBooks = oExcel.Workbooks
oBook = oBooks.Add()
and finally release the oBooks with oBooks = Nothing
Sincerely,
Jialiang Ge (
[email protected], remove ¡®online.¡¯)
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document:
http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box ¡°Tools/Options/Read: Get 300 headers at a time¡±
to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided ¡°AS IS¡± with no warranties, and confers no
rights.