+ Reply to Thread
Results 1 to 2 of 2

Order of Excel Addin

  1. #1

    Order of Excel Addin

    Hi,

    This is basically a follow up question to Charles Williams.

    Charles, you posted this very nice code to help my VBA addin assure
    that the C# addin that it depends on is loaded first.

    dim oAddin as addin


    on error resume next
    set oaddin=3Dnothing
    set oaddin=3Daddins("MyProjectname.c=ADlassname")
    on error goto 0
    if oaddin is nothing then
    addins.add("MyProjectname.clas=ADsname")
    set oaddin=3Daddins("MyProjectname.c=ADlassname")
    endif

    if not oaddin.installed then oaddin.installed=3Dtrue


    And, in fact, the desired effect takes place if the C# addin is not
    installed. But - the weirdest thing!!! - if I had previously quit Excel
    with the automation addin "clicked in", then this code does not
    accomplish its mission and the functions stored in the automation addin
    are not available to the VBA add-in!

    Any ideas on what might be going wrong?

    Grateful,

    Aaron Fude.


  2. #2

    Re: Order of Excel Addin

    As it always happens, right after I post I find a workaround (but not a
    solution). The following ugly hack fixes the problem:


    ' If Not oAddin.Installed Then oAddin.Installed = True
    oAddin.Installed = False
    oAddin.Installed = True

    Still, I would like to hear your opinion on what is going on!

    Aaron Fude


+ 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