BilboBaggins
New Member
- Joined
- Jun 3, 2014
- Messages
- 4
Hello MrExcel forum members,
I am trying to enable and disable Excel's Add-Ins using VBA. I originally had code that searched through the Excel file and grabbed the names of the Add-Ins from cells in the spreadsheet and uninstalled them. That wasn't working, so I tried using a simpler method:
There is a similar piece of code that I use for enabling the add-ins.
The problem is that the code doesn't disable all the add-ins at once. In fact, I have to run the VB code several times to disable (or enable) all the add-ins. In other words, I will run the code, open up the Add-Ins dialogue box, and note that only one of the checkboxes is unchecked. It takes multiple runs of the VBA program to successfully enable/disable all the Add-Ins.
I've been googling and searching the forums for the better part of a work day, and I'm getting fed up. Does anyone have experience with this problem?
Thanks,
Bilbo
EDIT: I am in Excel 2010, Windows 7
I am trying to enable and disable Excel's Add-Ins using VBA. I originally had code that searched through the Excel file and grabbed the names of the Add-Ins from cells in the spreadsheet and uninstalled them. That wasn't working, so I tried using a simpler method:
Code:
Sub DisableAddIn()
AddIns("My_addin_1").Installed = False
AddIns("My_addin_2").Installed = False
AddIns("My_addin_3").Installed = False
AddIns("My_addin_4").Installed = False
AddIns("My_addin_5").Installed = False
AddIns("My_addin_6").Installed = False
AddIns("My_addin_7").Installed = False
End Sub
The problem is that the code doesn't disable all the add-ins at once. In fact, I have to run the VB code several times to disable (or enable) all the add-ins. In other words, I will run the code, open up the Add-Ins dialogue box, and note that only one of the checkboxes is unchecked. It takes multiple runs of the VBA program to successfully enable/disable all the Add-Ins.
I've been googling and searching the forums for the better part of a work day, and I'm getting fed up. Does anyone have experience with this problem?
Thanks,
Bilbo
EDIT: I am in Excel 2010, Windows 7
Last edited: