We help IT Professionals succeed at work.

vba move and addin from %appdata% to c:\mymdl\

rberke asked
in excel 2003 there is no way to delete an addin with vba, you can only uninstall it which leaves it loaded.

But, is there some way to move the location?  

I have spent about 2 hours trying the obvious things, and none of them work.

For instance, I tried closing the addin and reopening it the correct location.  It works fine, but when I close excel entirely and reopen it, it goes back to its original location.  

I have 10 workstations where we need to do this, so I need a vba solution.

Watch Question

A "removed" (uninstalled) Add-in reference *is* unloaded; the collection of Add-ins within the list shown is only updated when you manually open the "Tools" / "Add-Ins..." dialog box & click the check-box beside the previously uninstalled Add-in name.

The associated file is then (re-)checked & you are prompted to remove the entry from the list shown if the file is not found.

You may, however, be able to remove entries from the appropriate Windows Registry settings key(s) via Visual Basic for Applications code, but this may have to be performed externally to MS-Excel in case closing the local user's MS-Excel session re-writes the Registry entries (reinstating the entry or entries you have just removed programmatically).




To summarize your comment "It is (nearly) impossible for vba to remove an addin from the list.  But it es easy to do it manually."

So, I went to all 10 workstations and did it manually.  It only took 20 minutes (including the time I spent chatting with the users.)

The reinstall of the addin in a new location could have been entirely automated by putting ...addins.add and associated  code into the open event associated with an xlstart workbook .

But, I have chosen a different route which is beyond the scope of this question.
Thanks for your follow-up comment.

Yes, I concur with your summary :)

The level of impossibility is directly proportional to the amount of time you have for unlimited monkeys & typewriters at your disposal.

Sometimes it just takes longer to automate "one-off" solutions than manually performing the same tasks.

That said, the tools/functionality provided my Microsoft Excel are far from ideal.

Good luck with your project.