If speed is important, eg calling the ATP multiple times, set a reference to
Atpvbaen.xls in Tools References. Otherwise use Application.Run
Sub test()
Dim start_date As Date, eom As Date
Dim months
start_date = Date
months = 12
' with a ref to the addin works fast
eom = EoMonth(start_date, months) ' with the ref
MsgBox eom
months = 1
' this works without the ref but much slower
eom = Application.Run("EoMonth", start_date, months)
MsgBox eom
End Sub
Regards,
Peter T
"VBA_EE_Engr" <(E-Mail Removed)> wrote in message
news

9C46F79-B468-4C80-A7BD-(E-Mail Removed)...
> How do I use the analysis toolpak for VBA? I loaded the add-in, but I
> can't
> seem to find any of the functions, and it asks for a password to open the
> atpvbaen project.