[ACCEPTED]-Loading addins when Excel is instantiated programmatically-excel-addins
I looked into this problem again, and the 8 Application.Addins collection seems to have 7 all the addins listed in the Tools->Addins 6 menu, with a boolean value stating whether 5 or not an addin is installed. So what seems 4 to work for me now is to loop through all 3 addins and if .Installed = true then I set 2 .Installed to False and back to True, and 1 that seems to properly load my addins.
Function ReloadXLAddins(TheXLApp As Excel.Application) As Boolean Dim CurrAddin As Excel.AddIn For Each CurrAddin In TheXLApp.AddIns If CurrAddin.Installed Then CurrAddin.Installed = False CurrAddin.Installed = True End If Next CurrAddin End Function
CreateObject("Excel.Application") would have the same result as using 3
New Excel.Application, unfortunately.
You will have to load the 2 Addins that you need individually by file 1 path & name using the
Application.Addins.Add(string fileName) method.
More Related questions