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