Thank you, Rob & Rob, for your replies.
It looks like the only recourse would be to take over Excel's job of
prompting to save as needed for all open files. I'm not too keen on that
idea because what works now may not work in the future. I sense there's too
many booby-traps lurking unseen.
But it's still a problem when the user suddenly sees that my menu is gone.
My app also has a custom toolbar which is not deleted, but it is made
invisible at the same time the menu is removed. I have the menu regenerated
if any toolbar button is clicked, but the user has to make the toolbar
visible again.
My app is only used with special workbooks. One possibility I'll think
about is to give all those workbooks a workbook_activate event that makes
sure the toolbar and menu are visible. But there obviously are logistical
problems with that approach (updating existing customer files with the event
macro).
Sigh!
Brian
"Rob Bovey" wrote in message
...
Hi Brian,
Unfortuantely, there isn't much you can do about this. When the user
closes Excel, all auto-close procedures in all add-ins run first, followed
by any open user workbooks. By the time a user is prompted to
save/close/cancel an open workbook, your add-in's Auto_Close or
Workbook_BeforeClose macro has already run.
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
"Brian Murphy" wrote in message
...
When an addin of mine closes I have the Auto_Close in the addin remove a
custom menu.
If the user gives the File/Exit command in Excel, the menu is removed
before
any dialog appears about saving open files. If he then cancels the close
action, excel stays open but my menu is gone.
Is there a way to prevent this?
Thanks,
Brian Murphy
Austin, TX