-
I am trying to use the VB Payment function to calculate a loan payment. So far unsuccessful. Here is what I have on my form:
A textbox named txtAmount, which is the loan amount the user enters
A combo box named cboTerm, which is the term of the loan 1-10
Another combo box named cboRate, which is the interest rate 5-15
A textbox named txtPayment, which displays the answer
A command button named cmdPayment
When cmdPayment is clicked, I would like the Monthly Payment to be displayed in the txtPayment textbox.
A form load procedure, which I have already coded, initally loads the combo box's.
Can anyone help me with the compute payment command button code?
-
Code:
inta as single
intb as single
Private Sub cmdPayment_click()
inta = txtAmount.text
intb = cboRate.text /100 * cboTerm.text
txtpayment.text = inta * inb
End Sub
i think that the code above is wrong, because i'm not sure how the rate is measured, and the term and all, but the code should work if i did it all correct