M
mike allen
How do you use the price and yield functions in code? I tried:
Sub testyield()
Cells(1, 1) = Application.yield(Cells(2, 1), Cells(3, 1), Cells(4, 1),
Cells(5, 1), 100, 2, 0)
End Sub
obviously, the inputs are settlement, maturity, rate, price, etc. that work
on spreadsheet.
Do I have to activate these functions somehow? I do have to enable analysis
tool pak in order to use functions such as these on a spreadsheet, but what
about code?
Thanks, Mike Allen
Sub testyield()
Cells(1, 1) = Application.yield(Cells(2, 1), Cells(3, 1), Cells(4, 1),
Cells(5, 1), 100, 2, 0)
End Sub
obviously, the inputs are settlement, maturity, rate, price, etc. that work
on spreadsheet.
Do I have to activate these functions somehow? I do have to enable analysis
tool pak in order to use functions such as these on a spreadsheet, but what
about code?
Thanks, Mike Allen