ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to programmatically remove an AddIn (xla) (https://www.excelbanter.com/excel-programming/303260-how-programmatically-remove-addin-xla.html)

Andyb

How to programmatically remove an AddIn (xla)
 
Is there a clean way to programmatically remove an XLA AddIn in Excel? (eg using VBA, modifying the registry etc)

I can load and install the AddIn using VBA using code somehting like this:

If Application.AddIns("MyAddIn") Is Nothing Then
With AddIns.Add("<MyAddInPath\MyAddIn.xla")
.Installed = True
End With
End If

And I know I can manually remove the entry in the AddIn list by deleting the AddIn .xla file and then seleciting it in the list and answering 'yes' when Excel prompts to remove it, but I would like to automate the uninstall of my app (which includes an Excel AddIn) without requiring the user to do this manually. It appears that there is no 'Remove' method for the AddIns collection.

Any suggestions?

Thanks

AndyB


Rob van Gelder[_4_]

How to programmatically remove an AddIn (xla)
 
Try something like:
Addins("Solver Add-in").Installed = False


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"AndyB" wrote in message
...
Is there a clean way to programmatically remove an XLA AddIn in Excel? (eg

using VBA, modifying the registry etc)

I can load and install the AddIn using VBA using code somehting like this:

If Application.AddIns("MyAddIn") Is Nothing Then
With AddIns.Add("<MyAddInPath\MyAddIn.xla")
.Installed = True
End With
End If

And I know I can manually remove the entry in the AddIn list by deleting

the AddIn .xla file and then seleciting it in the list and answering 'yes'
when Excel prompts to remove it, but I would like to automate the uninstall
of my app (which includes an Excel AddIn) without requiring the user to do
this manually. It appears that there is no 'Remove' method for the AddIns
collection.

Any suggestions?

Thanks

AndyB





All times are GMT +1. The time now is 12:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com