Hello,
I am finding that the easiest way to make some areas of my sheet work is to use functions from the Analysis Toolpack. The sheet I am making is intended to be a general use sheet that would go out to a large group most of whom don't have a lot of excel knowledge. I tried to write a routine to check for the add-in but it seems that every time the workbook is loaded it seems to think that the add-in is not loaded. I am not sure if I have the wrong syntax or something in my check.
On a side note I would really like to know if there is an easy way to have VBA code actually install the add-in (not just load but if it was not installed with excel to install it).
Here is the code I was trying to use.
If AddIns("analysis toolpak").Installed Then
'No action required since add-in already loaded
Else
Response = MsgBox("This sheet uses functions from the Analysis Toolpack that comes with Excel. It is not installed yet. Install Now?", 1, "Add-in Needs to be Installed")
If Response = vbYes Then ' User chose Yes.
AddIns("analysis toolpak").Installed = True
Else ' User chose No.
' either close the workbook or install the toolpack
End If
End If
Bookmarks