Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
When I debug this:
Private Sub calcbutton_Click(sender As System.Object, e As System.EventArgs) Handles calcbutton.Click 'The car price should appear in terms of dollars and cents. Dim carprice As Double 'The APR needs two percentage points Dim interestrate As Double 'Money down should be dollars and cents Dim moneydown As Double 'Dim loan term As Double Dim loanterm As Double 'Dim Payment as Double Dim payment As Double Dim monthlyinterest As Double Dim months As Double Dim loanamount As Double 'Declare where the values are coming from carprice = Val(Carpricetext.Text) interestrate = Val(IRTextbox.Text) moneydown = Val(Dwnpymnttext.Text) loanterm = Val(LnTrmList.SelectedValue) loanamount = (carprice - moneydown) Do While loanterm <= 5 monthlyinterest = (interestrate / 100) / 12 months = 12 * loanterm 'calculate payments - rate * month = monthly payments payment = _ Pmt(monthlyinterest, months, -loanamount) 'displays results paymenttxt.Text = payment Loop End Sub
Join the community of 500,000 technology professionals and ask your questions.