Hi Rexel12,
I assume that the add-in is already in Excel's list of available add-ins, but not installed (the checkbox is not checked). To get the add-in installed when the workbook opens, add the following code to the workbook's event code module:
Private Sub Workbook_Open()
AddIns("analysis toolpak").Installed = True
'add calls to any add-in macros here
End Sub
where the analysis toolpak add-in was use for example purposes. If you want one of the macros in the add-in to run as soon as the add-in is installed, place them where indicated. To install this code, right-click on the Excel icon at the left end of the Worksheet Menu toolbar, select View Code, and paste the code into the VBE code pane that appears.