LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default before close event

I wrote an add-in which I load on the Workbook_Open event, and close on the
Workbook_BeforeClose event.

I just noticed that if you go to close the file, but then hit Cancel, so
you're still in the file, my Add-In has been unloaded.

This means that the BeforeClose event is firing prior to the pressing of the
Cancel button, which then keeps the workbook open.

It's not a huge deal, but, someone will likely see this as a bug, if I leave
it this way. Ideas on how to trap the press of the Cancel button, and reload
the Add-In?

I'm not sure that's most efficient, though... I'd rather not unload the
Add-In until the workbook is really going to close.

Ideas?
Thanks.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Before Close Event Hide all Worksheets then Close Application RyanH Excel Programming 0 January 24th 08 03:15 PM
before close event with condition mohavv Excel Discussion (Misc queries) 4 November 21st 07 03:14 AM
Before Close event JT Excel Programming 2 April 5th 07 04:46 PM
Worksheet close event? has ex Excel Programming 4 April 12th 05 11:43 PM
After Close Event? Don Wiss Excel Programming 2 November 19th 03 12:30 AM


All times are GMT +1. The time now is 05:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"