+ Reply to Thread
Results 1 to 4 of 4

Using Workbook_AddinInstall -vs- Workbook_Open Events

  1. #1
    Bill Schanks
    Guest

    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. #2
    Jim Thomlinson
    Guest

    RE: 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. #3
    Doug Glancy
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >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. #4
    Doug Glancy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1