#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default COM add-ins

Is there a way via vba code to list the COM add-ins running in Excel?

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default COM add-ins

Try something like

Dim CAI As Office.COMAddIn
For Each CAI In Application.COMAddIns
If CAI.Connect = True Then
Debug.Print CAI.Description, CAI.progID
End If
Next CAI

This will list both COM Add-Ins that are installed and connected for
the current user (which will be listed in the COM Add-Ins dialog) as
well as CAIs that are loaded for all users (not listed in the CAI
dialog).

If you want a list of all CAIs, not just those currently loaded, get
rid of the If conditional in the code.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Mon, 5 Apr 2010 09:39:18 -0400, "Robert Flanagan"
wrote:

Is there a way via vba code to list the COM add-ins running in Excel?

Bob

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default COM add-ins

Hi,

Try this

Sub List_Addins()
Dim x As Long
x = 1
For Each Wb In Application.AddIns
Cells(x, 1) = Wb.Name
x = x + 1
Next Wb
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Robert Flanagan" wrote:

Is there a way via vba code to list the COM add-ins running in Excel?

Bob


.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default COM add-ins

That lists XLA and XLL add-ins, not COM add-ins.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com


On Mon, 5 Apr 2010 08:14:01 -0700, Mike H
wrote:

Hi,

Try this

Sub List_Addins()
Dim x As Long
x = 1
For Each Wb In Application.AddIns
Cells(x, 1) = Wb.Name
x = x + 1
Next Wb
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default COM add-ins

Thanks Chip. I ran the code and it listed two COM add-ins. When I clicked
on the COM Add-ins button one can add to a toolbar, only one of the two are
listed in the dialog. The other is not. What does that mean?

Bob

"Chip Pearson" wrote in message
...
Try something like

Dim CAI As Office.COMAddIn
For Each CAI In Application.COMAddIns
If CAI.Connect = True Then
Debug.Print CAI.Description, CAI.progID
End If
Next CAI

This will list both COM Add-Ins that are installed and connected for
the current user (which will be listed in the COM Add-Ins dialog) as
well as CAIs that are loaded for all users (not listed in the CAI
dialog).

If you want a list of all CAIs, not just those currently loaded, get
rid of the If conditional in the code.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Mon, 5 Apr 2010 09:39:18 -0400, "Robert Flanagan"
wrote:

Is there a way via vba code to list the COM add-ins running in Excel?

Bob





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default COM add-ins

You can see and control these Com Addins in the UI -
HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\ Addins

but not these common to all users
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Excel \Addins

Regards,
Peter T

"Robert Flanagan" wrote in message
...
Thanks Chip. I ran the code and it listed two COM add-ins. When I
clicked on the COM Add-ins button one can add to a toolbar, only one of
the two are listed in the dialog. The other is not. What does that mean?

Bob

"Chip Pearson" wrote in message
...
Try something like

Dim CAI As Office.COMAddIn
For Each CAI In Application.COMAddIns
If CAI.Connect = True Then
Debug.Print CAI.Description, CAI.progID
End If
Next CAI

This will list both COM Add-Ins that are installed and connected for
the current user (which will be listed in the COM Add-Ins dialog) as
well as CAIs that are loaded for all users (not listed in the CAI
dialog).

If you want a list of all CAIs, not just those currently loaded, get
rid of the If conditional in the code.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Mon, 5 Apr 2010 09:39:18 -0400, "Robert Flanagan"
wrote:

Is there a way via vba code to list the COM add-ins running in Excel?

Bob





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default COM add-ins

Only COM add-ins that are for the current user (in registry HKCU) are
displayed in the dialog. CAIs that are installed for all users of the
machine (registry HKLM) are not listed in the dialog, but are part of
the COMAddIns object. I believe that the reason for not listing the
all users' CAIs is to prevent one user from changing something that is
used by all users.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com



On Mon, 5 Apr 2010 20:19:42 -0400, "Robert Flanagan"
wrote:

Thanks Chip. I ran the code and it listed two COM add-ins. When I clicked
on the COM Add-ins button one can add to a toolbar, only one of the two are
listed in the dialog. The other is not. What does that mean?

Bob

"Chip Pearson" wrote in message
.. .
Try something like

Dim CAI As Office.COMAddIn
For Each CAI In Application.COMAddIns
If CAI.Connect = True Then
Debug.Print CAI.Description, CAI.progID
End If
Next CAI

This will list both COM Add-Ins that are installed and connected for
the current user (which will be listed in the COM Add-Ins dialog) as
well as CAIs that are loaded for all users (not listed in the CAI
dialog).

If you want a list of all CAIs, not just those currently loaded, get
rid of the If conditional in the code.


Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Mon, 5 Apr 2010 09:39:18 -0400, "Robert Flanagan"
wrote:

Is there a way via vba code to list the COM add-ins running in Excel?

Bob


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"