+ Reply to Thread
Results 1 to 11 of 11

Problem using AddIns.Installed

  1. #1
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Angry Problem using AddIns.Installed

    Hi

    I am in the process of developing a custom tab for the Excel ribbon (2007 and 2010) as an add-in (using Custom UI Editor). However, as I am sure most of you are aware, debugging an Excel add-in can be a real pain because of the process you must go to to remove the add-in and then re-add the add-in to the ribbon.

    As a result, I have added a button to my tab that uninstalls the add-in, so as to save myself some time whilst I am in the process of debugging. This button works perfectly. So I decided to make another add-in with a reinstall button that would complement this tab in the following way:

    - When I click on the reinstall button, my custom tab is installed and then my reinstall tab is uninstalled (in that order)
    - When I click on the uninstall button on the custom tab, my reinstall tab is installed and then my custom tab is uninstalled (again, in that order)

    The uninstall button still works perfectly on my custom tab. But when I click on the reinstall button on my second add-in, I get a prompt saying "Cannot run the macro ''Reinstall Adam''s Add-Ins.xlam'!Auto_Remove'. The macro may not be available in this workbook or all the macros may be disabled." but yet the custom tab still installs as it should. (Btw, I would be satisfied if I could stop the error coming up with an
    Please Login or Register  to view this content.
    but that doesn't work).

    The uninstall function looks like this (called from the custom tab):
    Please Login or Register  to view this content.
    And the reinstall function looks like this (called from the second add-in, which is also in its own ribbon developed with Custom UI Editor):
    Please Login or Register  to view this content.
    I have also tried changing the above pieces of code so that neither of the two add-ins is attempting to uninstall itself. In this case I have put the
    Please Login or Register  to view this content.
    in the
    Please Login or Register  to view this content.
    section of the other add-in (i.e. the custom tab uninstalls the reinstall tab when it is installed, and the reinstall tab uninstalls the custom tab when it is installed). The error message is almost the same, just with ''Adam''s Add-Ins'!Auto_Add' instead of ''Reinstall Adam''s Add-Ins'!Auto_Remove'.

    Please also note that everything works well if I don't attempt to uninstall the "Reinstall" tab, but I figured that there shouldn't be a problem with doing so because I can do it from the custom tab.

    Can someone please help me out with this, I have been working on this for 3 days now and I am getting really frustrated, and something that was supposed to be making my life easier is actually having the opposite effect.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Problem using AddIns.Installed

    Never mind, Peter from MSDN was able to help me solve this problem. For anyone else with the same problem, here is the link to the solution:

    http://social.msdn.microsoft.com/For...?prof=required

  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Problem using AddIns.Installed

    I confess that, like Peter, I am not clear why you feel the need to keep uninstalling and reinstalling the addin anyway?
    Good luck.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Problem using AddIns.Installed

    Thanks for your lack of constructive input. That's not the point. I don't post on forums to be criticised, I post to seek help because I couldn't solve the problem myself!

  5. #5
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Problem using AddIns.Installed

    That was a question, not a criticism, but never mind.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Problem using AddIns.Installed

    I apologise for getting the wrong idea, but the answer to your question is written in my original post. It's so I don't have to go into the Office menu system multiple times within a short space of time to remove/add the add-in when I make small changes to my code.

  7. #7
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Problem using AddIns.Installed

    That does not actually answer my question, which was really about why you have to keep uninstalling and reinstalling the addin? I frequently make changes to addin code whilst it is loaded.

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Problem using AddIns.Installed

    Ironically, I have only realised that I could do that since I fixed the problem lol

  9. #9
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Problem using AddIns.Installed

    Often the way!

    As you have fixed your issue, can you mark the thread Solved?

    PS Usually the only time you need to reload an adding is if you are holding a reference to the RibbonUI object and it goes out of scope, but you can work around that too (see Ron de Bruin's site here)
    Last edited by OnErrorGoto0; 02-11-2012 at 04:22 AM.

  10. #10
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Problem using AddIns.Installed

    I was looking for somewhere to do that, but I'm not sure how. I can't see an option anywhere...

  11. #11
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Problem using AddIns.Installed

    From the FAQ link above

    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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