Add Ins Collection Methods

Name Returns

Description

Item AddIn

Parameters: Item As Variant. Returns an Add-In associated with the item. The parameter can be either a number or the Progld of the Add-In (for example, MyAddin.dsrMyConnection).

Update

Updates the list of available COM Add-Ins from the Registry. This should only need to be used if you are compiling an Add-In through code (for example, using VBProject.MakeCompiledFile).

The following example iterates through all the Add-Ins registered for use in the VBE and prints information about those that are active:

Sub ListRunningAddins()

'Define as a VBE Addin, not an Excel one Dim oAddin As VBIDE.Addin

Sub ListRunningAddins()

'Define as a VBE Addin, not an Excel one Dim oAddin As VBIDE.Addin

'Loop through the VBE's addins

For Each oAddin In Application.VBE.AddIns

'Is it active (i.e. connected)? If oAddin.Connect Then

'Yes, so show it's ID and description Debug.Print oAddin.ProgId, oAddin.Description End If Next End Sub

Note that VBE Add-Ins do not have a property to provide their name, as shown in the list in the Add-In Manager dialog.

0 0

Post a comment