G
Guest
I'm trying to call this function:
Function XIRR(values As IXRangeEnum, dates As IXRangeEnum, [guess As Double = 0.100000001490116])
within VB (not VBA). I need to convert two vb arrays to IXRangeEnum and somehow pass them into this function.
Using this code such as:
Function getXIRR() As Double
Dim obj As OCATP
Dim arrDates(3) As Date
Dim arrAmount(3) As Double
arrDates(0) = #5/1/2000#
arrDates(1) = #6/1/2000#
arrDates(2) = #7/1/2000#
arrAmount(0) = -100
arrAmount(1) = 100
arrAmount(2) = 200
Set obj = New OCATP
getXIRR = obj.XIRR(arrAmount, arrDates)
End Function
Function XIRR(values As IXRangeEnum, dates As IXRangeEnum, [guess As Double = 0.100000001490116])
within VB (not VBA). I need to convert two vb arrays to IXRangeEnum and somehow pass them into this function.
Using this code such as:
Function getXIRR() As Double
Dim obj As OCATP
Dim arrDates(3) As Date
Dim arrAmount(3) As Double
arrDates(0) = #5/1/2000#
arrDates(1) = #6/1/2000#
arrDates(2) = #7/1/2000#
arrAmount(0) = -100
arrAmount(1) = 100
arrAmount(2) = 200
Set obj = New OCATP
getXIRR = obj.XIRR(arrAmount, arrDates)
End Function