Sub pmt (Rate As Double, Nper As Double, Pv As Double) As Double
If Rate = 0 Then
Return - Pv / Nper
Else
Return Pv * Power(Rate + 1, Nper) * Rate / (1 - Power(Rate + 1, Nper))
End If
End Sub
Sub pmt (Rate As Double, Nper As Double, Pv As Double) As Double
If Rate = 0 Then
Return - Pv / Nper
Else
Return Pv * Power(Rate + 1, Nper) * Rate / (1 - Power(Rate + 1, Nper))
End If
End Sub
See Erels answer. This seems to be the solution for your question. There is no library which does have a pmt function. But all you need is the sub above ;-)
See Erels answer. This seems to be the solution for your question. There is no library which does have a pmt function. But all you need is the sub above ;-)
Sub pmt (Rate As Double, Nper As Double, Pv As Double) As Double
If Rate = 0 Then
Return - Pv / Nper
Else
Return Pv * Power(Rate + 1, Nper) * Rate / (1 - Power(Rate + 1, Nper))
End If
End Sub
Sub CalcPmt
Dim Pi As Double
Pi = pmt(.07,360, 100000)
lblPi.Text = Pi
End Sub
It gives the answer as 849, but a 100K loan amount with a 30 year payment at 7% is 665. What do you think?
Please disregard. You were right. The function works perfectly. I was the problem. This is a great program and I am just getting started with it. Thank you!