Macro to open and close addins

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.
 
J

Jacob Skaria

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
 
S

Steph

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top