AddIn Object and the Add Ins Collection Example

This example ensures that the Analysis Toolpack is installed:

Sub UsingAnalysisToolpack(): Dim oAddin As AddIn

'Make sure the Analysis Toolpack is installed For Each oAddin In AddIns

If oAddin.Name = "analys32.xll" Then If oAddin.Installed = True Then MsgBox "True" Else

MsgBox "False" End If End If Next End Sub

Note that instead of looping through the Addins collection, you could use the Add-In's title:

Sub UsingAnalysisToolpack()

If AddIns("Analysis Toolpak")

.Installed = True Then

MsgBox "True"


MsgBox "False"

End If

End Sub

Unfortunately, this approach may not work with a non-English User-Interface language, if the Add-In's title has been localized.

0 -1

Post a comment