+ Reply to Thread
Results 1 to 4 of 4

Why is the Excel Addin the Activeworkbook

  1. #1
    Martin in Frisco Texas
    Guest

    Why is the Excel Addin the Activeworkbook

    Why is the Excel Addin the Activeworkbook. The IS Addin is set to true, but
    the Addin is the active workbook when called by a Auto_Open macro from a
    workbook until the Auto_Open macro is finished?

  2. #2
    Vacation's Over
    Guest

    RE: Why is the Excel Addin the Activeworkbook

    Maybe because it is "active" opening itself??

    Any workbook can be the "activeworkbook"

    This is why we use Thisworkbook within addins so it is clear that we are
    refering to the wb that has the code in it.

    Depending on why this bothers you you may want to assign a variable to your
    original wb and then call it by name

    dim myWB as Workbook
    set myWB = Activeworkbook
    auto_open some addin
    myWB.dosomething


    "Martin in Frisco Texas" wrote:

    > Why is the Excel Addin the Activeworkbook. The IS Addin is set to true, but
    > the Addin is the active workbook when called by a Auto_Open macro from a
    > workbook until the Auto_Open macro is finished?


  3. #3
    Martin in Frisco Texas
    Guest

    RE: Why is the Excel Addin the Activeworkbook

    Vacations Over

    Thanks

    Martin

    "Vacation's Over" wrote:

    > Maybe because it is "active" opening itself??
    >
    > Any workbook can be the "activeworkbook"
    >
    > This is why we use Thisworkbook within addins so it is clear that we are
    > refering to the wb that has the code in it.
    >
    > Depending on why this bothers you you may want to assign a variable to your
    > original wb and then call it by name
    >
    > dim myWB as Workbook
    > set myWB = Activeworkbook
    > auto_open some addin
    > myWB.dosomething
    >
    >
    > "Martin in Frisco Texas" wrote:
    >
    > > Why is the Excel Addin the Activeworkbook. The IS Addin is set to true, but
    > > the Addin is the active workbook when called by a Auto_Open macro from a
    > > workbook until the Auto_Open macro is finished?


  4. #4
    Ethan Strauss
    Guest

    RE: Why is the Excel Addin the Activeworkbook

    Note quite the same, but related. I can't get the an AddIn to run an macro
    when a workbook opens. I have tried a number of different configurations
    (Workbook_Activate, App_Activate, Workbook_Open, and others) and none of them
    trigger when I open Excel with the AddIn running.
    I have thought that part of the problem is that the AddIn Workbooks is never
    really running. I am not sure.
    I would appreciate any help.
    Thanks,
    Ethan

    "Vacation's Over" wrote:

    > Maybe because it is "active" opening itself??
    >
    > Any workbook can be the "activeworkbook"
    >
    > This is why we use Thisworkbook within addins so it is clear that we are
    > refering to the wb that has the code in it.
    >
    > Depending on why this bothers you you may want to assign a variable to your
    > original wb and then call it by name
    >
    > dim myWB as Workbook
    > set myWB = Activeworkbook
    > auto_open some addin
    > myWB.dosomething
    >
    >
    > "Martin in Frisco Texas" wrote:
    >
    > > Why is the Excel Addin the Activeworkbook. The IS Addin is set to true, but
    > > the Addin is the active workbook when called by a Auto_Open macro from a
    > > workbook until the Auto_Open macro is finished?


+ 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