Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default 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
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
Conversion to XP causing problems Lynniebud Excel Programming 2 April 20th 09 11:17 AM
Excel closes unexpectedly on print command causing a spooler.exe e Double-UA Excel Discussion (Misc queries) 2 December 22nd 07 01:07 PM
Repeated calls to Solver.xla causing Excel problems Duke Carey Excel Programming 0 December 4th 07 04:11 PM
Addins causing problems Andrew- Excel Programming 6 June 30th 05 07:25 PM
Is Excel causing me system problems? Sandra Excel Discussion (Misc queries) 1 April 7th 05 09:04 PM


All times are GMT +1. The time now is 03:35 PM.

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

About Us

"It's about Microsoft Excel"