I thought the guy that wrote the add-in would have provided them ...
Private Sub Workbook_Open()
Const sAddIn As String = "myAddIn.xla"
On Error Resume Next
Name ThisWorkbook.Path & "\" & sAddIn As _
Application.UserLibraryPath & sAddIn
If Err.Number Then
MsgBox "Unable to copy add-in to library. Call 911!"
Else
Application.AddIns(Left(sAddIn, InStr(sAddIn, ".") - 1)).Installed = True
If Err.Number = 0 Then
MsgBox "Add-in installed."
Else
MsgBox "Add-in installation failed"
End If
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
Bookmarks