Hello I am a beginner in visual basic and I had to do my first project to calculate a monthly payment using principal, annual rate in decimal, and time in years, which are all controlled by horizontal scroll bars. I have everything set up except I can not figure out the formula for the monthly payment. Also I am required to have option explicit and strict on.
The formula that i was given is this Name:  payment.jpg
Views: 577
Size:  15.1 KB
where c is the monthly payment,
r is the monthly interest rate, expressed as a decimal, not a percentage
N is the number of monthly payments, called the loan's term,
P is the amount borrowed, known as the loan's principal.

The way that i calculated the annual rate is this:
lblAnnualPercent.Text = CStr(0.1 * hsbAnnualRate.Value)
The way that i calculated the principal is this:
lblPrincipalAmount.Text = "$" & CStr(100 * hsbPrincipal.Value)
And the way that I calculated the time is this:
lblTimeYears.Text = CStr(hsbTime.Value)

I tried a bunch of different ways to come up with the formula to calculate the monthly payment and I kept getting errors. Can anybody please help me?