Disable all Add ins at excel startup


Board Regular
Dec 29, 2015
Office Version
  1. 2007
  1. Windows
Dear Sir/Madam,

I have been looking for the solutions for last 2 days and spent almost 36 hrs on my laptop..:p. But no luck.


1. I have a file named PROJECT.xlsm
2. In my system I have few Add-ins (both COM Add in and Excel Add in) like RDB Merge, Nitro PDF Pro etc.
3. I don't want to load any Available Add-ins when I start this PROJECT.xlsm file.
4. Also When I will close that file, all Add-ins will be available for other Excel files.
5. I have achieved the same using code at Workbook_Open and Workbook_BeforeClose event as follows

Workbook_Open Event:

Private Sub Workbook_Open() 
Do While AddIns("RDBMerge Add-in").Installed = True

AddIns("RDBMerge Add-in").Installed = False


Do While Application.COMAddIns("TFCOfficeShim.Connect.3").Connect = True
Application.COMAddIns("TFCOfficeShim.Connect.3").Connect = False

Do While Application.COMAddIns("DeTong.KTELoader").Connect = True
Application.COMAddIns("DeTong.KTELoader").Connect = False

Do While Application.COMAddIns("DeTong.KTEHelper").Connect = True
Application.COMAddIns("DeTong.KTEHelper").Connect = False

End Sub

Workbook_BeforeClose event:

Private Sub Workbook_BeforeClose(Cancel As Boolean) 
Do While AddIns("RDBMerge Add-in").Installed = False

AddIns("RDBMerge Add-in").Installed = True


Do While Application.COMAddIns("TFCOfficeShim.Connect.3").Connect = False
Application.COMAddIns("TFCOfficeShim.Connect.3").Connect = True

Do While Application.COMAddIns("DeTong.KTELoader").Connect = False
Application.COMAddIns("DeTong.KTELoader").Connect = True

Do While Application.COMAddIns("DeTong.KTEHelper").Connect = False
Application.COMAddIns("DeTong.KTEHelper").Connect = True

End Sub

This works fine for anyone if you know which particular COM Addin or Excel Addin you want to block.

BUT My question: Is there any method do block all add in without mentioning it's name at Workbook_Open and re-activate them after closing my PROJECT.xlsm?

I have another code which finds out how many COM Addi ns or Excel Add ins are available and print their name and location in active sheet. Here is the code(I found it in internet) which needs to entered in a standard module--

Public Sub Addins_List_All()Dim oAddin As AddIn
Dim oCOMAddin As ComAddin
Dim icount As Integer
Dim istart As Integer
   For icount = 1 To Application.AddIns.Count
      Range("A" & icount).Value = Application.AddIns(icount).Name
      Range("B" & icount).Value = Application.AddIns(icount).FullName
      Range("C" & icount).Value = Application.AddIns(icount).Installed
   Next icount
   istart = icount
   For icount = 1 To Application.COMAddIns.Count
      Set oCOMAddin = Application.COMAddIns(icount)
      Range("A" & istart + icount).Value = Application.COMAddIns(icount).Description
      Range("B" & istart + icount).Value = Application.COMAddIns(icount).progID
      Range("C" & istart + icount).Value = Application.COMAddIns(icount).Connect
   Next icount
End Sub

Please help me. I want to protect my PROJECT.xlsm from any bad/unkown addins while using it.

Thanks and Regards,


Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Latest member

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back