I need macro help

  • Thread starter Thread starter Littleguy
  • Start date Start date
L

Littleguy

I have a excel template that uses the analysis toolpak. However not
everybody in my company has that function initiated. I need a macro
that will check when the program is opened and will tick the addin if
it is not already ticked.
 
With Application.AddIns("Analysis ToolPak")
If Not .Installed Then
.Installed = True
End If
End With


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
You need this in the Thisworkbook module

Private Sub Workbook_Open()
AddIns("analysis toolpak").Installed = True
End Sub

And maybe this to unload when workbook close.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
AddIns("analysis toolpak").Installed = False
End Sub


Gord Dibben MS Excel MVP
 

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

Back
Top