View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wei-Dong Xu [MSFT] Wei-Dong Xu [MSFT] is offline
external usenet poster
 
Posts: 120
Default ThisWorkbook.close doesn't wokk :(

Hi Arnaud,

Thanks for posting in the community!

From my understanding, you have created one Excel xla add-in which will
capture the Workbook_BeforeClose event. If you double-click it, Excel works
very smoothly. However, if you start this from some startup switches, in
Excel 97, the xla can not be unloaded; in Excel 2000, this xla crashes.

In Excel 97, this is one known issue for the Workbook_BeforeClose event in
VBA. I'd suggest you can check the kb article for one workaround.
172749 XL97: Unable to Close File Activated by WorkbookBeforeClose
http://support.microsoft.com/?id=172749

In Excel 2000, since I don't know what Startup switches you used to start
Excel with the XLA add-in, I am not sure whether this event caused the
crash or something else. Moreover, I am also not sure whether you have
installed the latest office updates and patches for Office 2000 from
Office.Microsoft.com. If not, please go to the link to perform one
automatic update checking.
http://office.microsoft.com/search/r...331033&Origin=
HH011136791033&CTT=5

After that, if the issue remains no matter existing in 97 or 2000, I'd
suggest you can give me one detailed repro steps ( for 97 or 2000 or both )
with that add-in file ( or one simplified sample add-in which can crash
Excel2000 ) so that I can test this for you.

Look forward to your reply. Enjoy a nice weekend!

Wei-Dong Xu
Microsoft Product Support Services
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.