Macro to open and close addins

  • Thread starter Thread starter Steph
  • Start date Start date
S

Steph

Can anyone provide an example of a macro that loads and / or unloads an
add-in file when run? For example, if it loads the add-in I would want to
see the file appear in the add-ins available dialog box. When it unloads the
add-in, it would then be removed from the dialog box. Thanks for your help.
 
Try

Sub AddinInstall()
If Not Application.AddIns("Analysis Toolpak - VBA").Installed Then _
Application.AddIns("Analysis Toolpak - VBA").Installed = True
End Sub

Sub AddinUnInstall()
If Application.AddIns("Analysis Toolpak - VBA").Installed Then _
Application.AddIns("Analysis Toolpak - VBA").Installed = False
End Sub
 
Thank you!!
--
Steph


Jacob Skaria said:
Try

Sub AddinInstall()
If Not Application.AddIns("Analysis Toolpak - VBA").Installed Then _
Application.AddIns("Analysis Toolpak - VBA").Installed = True
End Sub

Sub AddinUnInstall()
If Application.AddIns("Analysis Toolpak - VBA").Installed Then _
Application.AddIns("Analysis Toolpak - VBA").Installed = False
End Sub
 
Back
Top