XIrr in VBA error
On Thu, 22 Dec 2005 11:36:04 -0800, CyberBuzzard
wrote:
I have setup the reference to ATPVBAEN.XLS in my project, the Add-In is
installed in Excel, I also found the function in the Object Browser under
atpvbaen.xls.VBA Functions and Subs.
Nevertheless I can't make my code work, getting the "Object doesn't support
this property or method" prompt, when writen like this:
rngXIrrCalc = Application.WorksheetFunction.XIrr(rng1, rng2)
I would greatly appreciate if someone can help me with this.
Since you did not find the XIRR function in the WorksheetFunction class, that
means it is not a member of that class. Hence your error message.
After setting the reference as you did, you should be able to use XIRR as you
would any other function.
e.g.:
rngXIrrCalc = XIrr(rng1, rng2)
--ron
|