BUG: COM Add-In unloads before the application is shut down in Microsoft Excel (831200)
The information in this article applies to:
- Microsoft Office Excel 2003
- Microsoft Excel 2002
- Microsoft Excel 2000
SYMPTOMSWhen you work with a Microsoft Excel application, you can extend application functionality by using a custom Component Object Model (COM) Add-In. The add-in can be set to load at startup. The add-in remains loaded until the application is shut down. However, if Excel is started for OLE or for remote Automation, and the application is made visible to you, when you try to close the Excel window, the Excel window is only hidden, and the application remains running. When this behavior occurs, the COM Add-In is unloaded as if the application has been shut down. The OnBeginShutdown event and the OnDisconnection event are called, and the add-in is removed from memory. If the application is made visible again, the COM Add-In is no longer loaded. The menu items or the toolbar items that were added by the COM Add-In may no longer be available. You may be unable to use the COM Add-In again in that instance of Excel.CAUSE Excel is designed to remain loaded until all external connections have been released. If you manually close the Excel window, but an external OLE host or an Automation host still has a reference count to the application, Excel hides but continues to run. This behavior is intentional, and this behavior follows the correct COM rules about object lifetime. However, an internal event is triggered during this process that can cause Excel to start a shutdown and then to unload all COM Add-Ins before Excel determines that the application will not be closed because of the external references. Because of this problem, COM Add-Ins can be prematurely unloaded before the actual application termination.STATUS
Microsoft has confirmed that this is a bug in Microsoft Excel 2000, Microsoft Excel 2002, and Microsoft Office Excel 2003.
Modification Type: | Minor | Last Reviewed: | 12/18/2003 |
---|
Keywords: | kbpending kbBug KB831200 kbAudDeveloper |
---|
|