Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add-in closes first when Excel is closed, causing problems
I have an add-in whose workbook_beforeclose event closes a toolbar that is
attached to the add-in. When a user closes Excel, it appears that the event is closed as one of the first, and the toolbar is deleted. However, if the user has made changes to other workbooks, he is asked whether he wants to save them and upon canceling this operation, Excel remains active as does the add-in. The toolbar is gone and cannot be made visible again as it has been deleted. The only way is to close and restart excel. When Excel is really closed after the aborted first time, an error occurs, because the workbook_beforeclose event now tries to delete an already deleted toolbar. Is there a way to solve this problem? Thanks in advance, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add-in closes first when Excel is closed, causing problems
Why delete the toolbar? The add-in will load again when you open Excel.
You can put an "On Error Resume Next" statement in front of the delete statement and "On Error Goto 0" right after. This will stop the error msg. Robert Flanagan http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Arne" wrote in message ... I have an add-in whose workbook_beforeclose event closes a toolbar that is attached to the add-in. When a user closes Excel, it appears that the event is closed as one of the first, and the toolbar is deleted. However, if the user has made changes to other workbooks, he is asked whether he wants to save them and upon canceling this operation, Excel remains active as does the add-in. The toolbar is gone and cannot be made visible again as it has been deleted. The only way is to close and restart excel. When Excel is really closed after the aborted first time, an error occurs, because the workbook_beforeclose event now tries to delete an already deleted toolbar. Is there a way to solve this problem? Thanks in advance, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conversion to XP causing problems | Excel Programming | |||
Excel closes unexpectedly on print command causing a spooler.exe e | Excel Discussion (Misc queries) | |||
Repeated calls to Solver.xla causing Excel problems | Excel Programming | |||
Addins causing problems | Excel Programming | |||
Is Excel causing me system problems? | Excel Discussion (Misc queries) |