View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Childs Tim Childs is offline
external usenet poster
 
Posts: 128
Default Opening Add-in files manually

Walt

Many thanks for coming back on this - can you confirm that the only method
to get the add-in to function prperly is to use the code

AddIns("Analysis ToolPak").Installed = True

as opposed to simply loading the file itself

I thought an add-in was basically the same as an ordinary file but part of
the add-ins grouping

THANKS

Tim



"Walt Weber" wrote in message
...
Hi Tim,

This is code I use within the auto_open routine.

On Error Resume Next 'LOAD & TEST SUCCESS OF LOAD OF
ANALYSIS TOOLPAC
AddIns("Analysis ToolPak").Installed = True
If AddIns("Analysis ToolPak").Installed = False Then
MsgBox "Excel's Analysis ToolPac could not be
loaded." & Chr(13) & _
"This usually means that Excel was installed
with the default settings." _
& Chr(13) & "The Analysis ToolPac includes some
spreadsheet functions used by this application." _
& Chr(13) & "To remedy the situation, it will be
necessary to load the Analysis ToolPac" _
& Chr(13) & "from the Excel installation CD." &
Chr(13) & _
Chr(13) & "This application will close now."
ThisWorkbook.Saved = True
Application.Quit
End
End If
On Error GoTo 0

Since I just pasted the code here, you'll need to adjust
for the word wrap.

Best Regards,
Walt