Actually, it won't work as written. See my other post with a successful
subroutine.
Put the code in a module, and call it from the immediate window to see
result. The actual data is for test purposes, obviously, so you will need
to fill the arrays p and d with data either from a query or table, or direct
input from a form. To keep it simple, start with a form, with a series of
textboxes for the value, and another series for the dates. Then just change
the code in the subroutine TestXirr to read the data from the form - so
p(0)= me.textbox1, etc.
Add a command button to the form and in the click event call TestXirr.
Change the debug.print line to a textbox on your form (named "txtResult")
like this:
me.txtResult = Result
Realize that this is really rudimentory, and will only get you started...
Damon