Analysis ToolPak

S

Secret Squirrel

I'm using some formulas that have to be used with the addin "Analysis
Toolpak". I have users that use versions 2000, 2003, & 2007. How do I get
this addin to automatically load with my file? I've had to go around and load
that addin on everyone's pc. Is there an easier way?
 
J

Jim Cone

'In my free "Math Practice" workbook, I have the user load the add-in...
'ThisWorkbook module...

Private Sub Workbook_Open()
'Jim Cone - San Francisco, USA - March 2007
'http://www.realezsites.com/bus/primitivesoftware
'Checks for the Analysis ToolPak. Calls IsItOpen sub.
On Error GoTo MakeNoise
If IsItOpen("FUNCRES.XLA") = False Then
Application.Cursor = xlDefault
MsgBox "The Analysis ToolPak add-in is required." & vbCr & _
"Go to the Tools menu and select Add-Ins. " & vbCr & _
"Checkmark... Analysis ToolPak.", vbInformation, "Math Practice"
End If
Exit Sub
MakeNoise:
Beep
Resume Next
End Sub
'--

'Standard module...

Function IsItOpen(ByRef strName As String) As Boolean
'Called by the Workbook_Open event.
'Checks for the Analysis ToolPak).
On Error Resume Next
Dim WB As Excel.Workbook
Set WB = Excel.Workbooks(strName)
IsItOpen = (Err.Number = 0)
Set WB = Nothing
End Function
--

The "Math Practice" workbook is available upon direct request to
those with a real name and geographic location.
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Secret Squirrel"
wrote in message
I'm using some formulas that have to be used with the addin "Analysis
Toolpak". I have users that use versions 2000, 2003, & 2007. How do I get
this addin to automatically load with my file? I've had to go around and load
that addin on everyone's pc. Is there an easier way?
 
J

Jim Cone

Put the code following the line "ThisWorkbook module" in the ThisWorkbook module.
Put the code following the line "Standard module" in a standard module.
Jim Cone


"Secret Squirrel"
<[email protected]>
wrote in message
Thanks Jim. Do I put that into a module in the workbook?
 
S

Secret Squirrel

Will this prompt the user to select the add-in? If so is there a way to do it
programatically without the user having to select it?
 
G

Gord Dibben

Private Sub Workbook_Open()
AddIns("Analysis ToolPak").Installed = True
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

Top