Thread: Newbie Question
View Single Post
  #7 (permalink)  
Old 05-30-2008, 09:27 PM
Stevenator65 Stevenator65 is offline
Newbie
 
Join Date: May 2008
Posts: 5
Default

I figured it out. I made an error. I was supposed to subtract 1, not multiply by negative one. Here's my final code:

Sub cmdCalc_Click
Dim Prin
Dim Rate
Dim Term
Dim MonthlyRate
Dim Payment
Dim Middle
Dim bottom



Prin = txtPrin.Text
Rate = txtRate.Text / 1200
Term = txtLength.Text * 12

bottom = ((1 + Rate) ^ (Term ))
bottom = bottom - 1
middle = Rate / bottom
Payment = (Rate + middle) * Prin

lblOut.Text = Payment

Thanks for the help.
Reply With Quote