Analysis ToolPak

novice1

Board Regular
Joined
Dec 11, 2007
Messages
146
I have this code that will automatically load the ATP. but if the user did not initially install it on their computer when they installed their excel program, can anyone help rewrite the code to check to see if it is installed and if not , create a msgbox indicating not installed.

Code:
Private Sub Workbook_Open()
    If AddIns("Analysis ToolPak").Installed Then
    MsgBox "already installed"
         'No action required since add-in already loaded
    Else
        AddIns("Analysis ToolPak").Installed = True
    End If
End Sub
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi

I presume you could test to see if it is available by using error-handling when you attempt to install ie:

Code:
Private Sub Workbook_Open()
    If AddIns("Analysis ToolPak").Installed Then
    MsgBox "already installed"
         'No action required since add-in already loaded
    Else
        On Error Resume Next
        AddIns("Analysis ToolPak").Installed = True
        If Err<>0 Then MsgBox "ATP unavailable - dig out your Office CD to install!"
    End If
End Sub

Note I haven't tested this so it may not work.
 
Upvote 0
When I initially installed Excel using the standard install method, will this automatically install the toolpak? Also will it load the toolpak as well?
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,150
Members
448,552
Latest member
WORKINGWITHNOLEADER

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top