Disabling a COM Add-In

HunterN

Active Member
Joined
Mar 19, 2002
Messages
479
Hi everyone,

Is there a way using VBA that will allow me to disable a COM Add-in when I open a workbook without me (or the user) going through the steps to remove it first.

The reason for my asking is this: We have installed SAS Add-in 2.1 to Excel 2007. So this brings up SAS under the Add-Ins tab. But then when my program executes and it sees I use command bars, it adds my command bars under the SAS menu. I am trying to make the interface as clean as possible for the user, so they only see my command bars or menus.

Also, if we were to install the SAS Add-in 4.2 to Excel 2007, would that help me out? I have read in a SAS paper that SAS Add-in 4.2 creates its owe tab on the ribbon instead of inside the Add-in tab. So I would be able to use xml to make the SAS tab visible="false".

Any thoughts on this would help me out.

Thanks, Nancy
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If you are happy to use XML, why not create your own tab for your workbook?
 
Upvote 0
I can do that evidently. Right now I have less than a month to convert my old excel applications into office 2007 Excel and test them all. That will be in the works after I convert them all.

Do you know the answer to my question between the difference of 2.1 and 4.2 Add-Ins?

Thanks for your reply.

Nancy
 
Upvote 0
No, I don't use SAS.
You can disable COM addins in code by setting their Connect property to False.
 
Upvote 0
Sure:
Code:
application.comaddins("ApplicationAddin.AddinModule").connect = False
you need to use the ProgID as the name. Or you could simply disable all of them in a loop.
 
Upvote 0
Hi Rorya,

Would it be like this:

Application.COMAddIns("ApplicationAddin.SAS").Connect = False

since I am wanting to remove the SAS Addin.

Thanks,
Nancy
 
Upvote 0
I doubt it - the one I posted is the specific progID for an addin I have. You can list them on a worksheet like this:
Code:
Sub ListCOMAddins()
Dim lngRow as Long, objCOMAddin As COMAddIn
lngRow = 1
With Activesheet
      For Each objCOMAddin In Application.COMAddIns
         .Cells(lngRow, "A").Value = objCOMAddin.Description
         .Cells(lngRow, "B").Value = objCOMAddin.Connect
         .Cells(lngRow, "C").Value = objCOMAddin.progID
         lngRow = lngRow + 1
      Next objCOMAddin
End With
End Sub
 
Upvote 0
This is what I get when I run that sub:

SAS Add-In for Microsoft Office Bootstrapper TRUE SAS.OfficeAddin.Loader.BootstrapConnectProxy
SAS TRUE SAS.OfficeAddin.Loader.ConnectProxy


So since I want to remove the SAS COM Add-In I used SAS (is this the ProjID)?

Thanks,
Nancy
 
Upvote 0
The ProgID is SAS.OfficeAddin.Loader.ConnectProxy
 
Upvote 0

Forum statistics

Threads
1,216,731
Messages
6,132,390
Members
449,725
Latest member
Enero1

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
Back
Top