Loop w/ Public Function as arguement
I am trying to create a loop to count how many times a date function I have
written is performed before a criteria is met. I am receiving a ByRef error,
and do no know how to fix it. Here is the code:
Public Function myfunc(testdate, maturitydate)
counter = 0
Do While maturitydate testdate
testdate = nextcdate(testdate)
counter = counter + 1
Loop
myfunc = counter
End Function
Thanks
|