|
-
Feb 14th, 2016, 01:46 AM
#1
Thread Starter
New Member
Help with formula for my project
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 
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?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|