Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Using Workbook_AddinInstall -vs- Workbook_Open Events

When I create add-ins that have toolbars I always add the custom
toolbars at that time, and remove them in the Workbook_AddinUninstall
event.

I notice that most other addins (EssBase, MS Add-ins) don't do it this
way. The toolbars get added each time the add-in is loaded via the
Workbook_Open event.

Is there some type of common practice that should be used?

Is there some reason why you should choose one over the other? It seems
to me that by using the Workbook_open event it takes longer to load
Excel.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Using Workbook_AddinInstall -vs- Workbook_Open Events

I always use the Install and uninstall to add items such as menu items, ...
The advantage to using install uninstall is that the menu bar persists even
if the user chooses to cancel after selecting to close Excel. Note with the
Essbase tolbar, if you choose cancel after selecting to shut down Excel the
addin is gone. I use the Open event to create objects and such becuase I need
to instatiate the objects when Excel is opened.Just my two cents but It works
well for me.
--
HTH...

Jim Thomlinson


"Bill Schanks" wrote:

When I create add-ins that have toolbars I always add the custom
toolbars at that time, and remove them in the Workbook_AddinUninstall
event.

I notice that most other addins (EssBase, MS Add-ins) don't do it this
way. The toolbars get added each time the add-in is loaded via the
Workbook_Open event.

Is there some type of common practice that should be used?

Is there some reason why you should choose one over the other? It seems
to me that by using the Workbook_open event it takes longer to load
Excel.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Using Workbook_AddinInstall -vs- Workbook_Open Events

Jim and Bill,

I use WorkbookDeactivate to for uninstalling workbook-specific menus. It
has the same advantage Jim describes - it happens after the cancel prompt on
shutting down Excel.

--
Doug


"Jim Thomlinson" wrote in
message ...
I always use the Install and uninstall to add items such as menu items, ...
The advantage to using install uninstall is that the menu bar persists
even
if the user chooses to cancel after selecting to close Excel. Note with
the
Essbase tolbar, if you choose cancel after selecting to shut down Excel
the
addin is gone. I use the Open event to create objects and such becuase I
need
to instatiate the objects when Excel is opened.Just my two cents but It
works
well for me.
--
HTH...

Jim Thomlinson


"Bill Schanks" wrote:

When I create add-ins that have toolbars I always add the custom
toolbars at that time, and remove them in the Workbook_AddinUninstall
event.

I notice that most other addins (EssBase, MS Add-ins) don't do it this
way. The toolbars get added each time the add-in is loaded via the
Workbook_Open event.

Is there some type of common practice that should be used?

Is there some reason why you should choose one over the other? It seems
to me that by using the Workbook_open event it takes longer to load
Excel.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Using Workbook_AddinInstall -vs- Workbook_Open Events

Bill,

I've been thinking about menus a lot lately, and I had one other thought
about your post...

I've taken it to heart that it's a good practice to make all custom toolbars
temporary, so that they're deleted when Excel closes. This seems like good
practice, in that if something goes wrong and a toolbar that was supposed to
be deleted is not, then at least it's gone when Excel is restarted. This
practice doesn't seem to be compatible with building the toolbars at
AddinInstall because you won't necessarily have your toolbar the next time
Excel opens. So maybe that's a reason to use Open, or Activate?

--
Doug


"Bill Schanks" wrote in message
ups.com...
When I create add-ins that have toolbars I always add the custom
toolbars at that time, and remove them in the Workbook_AddinUninstall
event.

I notice that most other addins (EssBase, MS Add-ins) don't do it this
way. The toolbars get added each time the add-in is loaded via the
Workbook_Open event.

Is there some type of common practice that should be used?

Is there some reason why you should choose one over the other? It seems
to me that by using the Workbook_open event it takes longer to load
Excel.



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
Workbook_Open - Multiple Events not all working Punsterr Excel Programming 2 October 6th 05 07:44 AM
Workbook_Open Jim Zeeb[_2_] Excel Programming 8 December 3rd 04 11:54 PM
workbook_open julio Excel Programming 4 September 26th 04 10:23 PM
Workbook_Open Eric Marple Excel Programming 3 May 10th 04 01:24 AM
Why Excel 2002 crashes on simplest Workbook_Open events? RADO[_3_] Excel Programming 1 November 8th 03 09:31 PM


All times are GMT +1. The time now is 01:13 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"