Verify Analysis ToolPak with VBA
You could take it out of their hands and enable the add-ins yourself.
Private Sub Workbook_Open()
AddIns("Analysis ToolPak").Installed = True
AddIns("Analysis ToolPak - VBA").Installed = True
End Sub
Be sure to change to False on closing the workbook.
If you just want a message as you asked use this example code in
workbook_open
Private Sub Workbook_Open()
Set a = AddIns("Analysis ToolPak")
If a.Installed = True Then
MsgBox "The ATP add-in is installed"
Else
MsgBox "The ATP add-in is not installed"
End If
End Sub
Gord Dibben MS Excel MVP
On Wed, 21 Jan 2009 07:47:02 -0800, Horatio J. Bilge, Jr.
wrote:
I created a workbook that requires the Analysis ToolPak and Analysis
ToolPak-VBA add-ins to function. I've discovered that many of the people I
gave the workbook to do not have those add-ins enabled, so they get the
#NAME? error.
Is there a way to automatically check for the Analysis ToolPak? I am
thinking that if the ToolPak is not enabled, a message box would pop up
telling the user what the problem is, and how to install the ToolPak.
Thanks!
|