I've used the below before...
...the main part for checking/unchecking is to use the .installed.
Function Load_XL_AddIn(strFilePath As String, strAddInName As String)
As Boolean
Dim addXL As Excel.addin
On Error Resume Next
strAddInName = Left(strAddInName, Len(strAddInName) - 4)
Set addXL = Excel.AddIns(strAddInName)
If Err < 0 Then
Err.Clear
Set addXL = Excel.AddIns.Add(strFilePath, 1)
If Err < 0 Then
Load_XL_AddIn = False
GoTo Load_XL_AddIn_End
End If
End If
If Not addXL.Installed Then addXL.Installed = True
Load_XL_AddIn = True
Load_XL_AddIn_End:
Exit Function
End Function
--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile:
http://www.excelforum.com/member.php...fo&userid=3472
View this thread:
http://www.excelforum.com/showthread...hreadid=542378