Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!
loanterm = Val(LnTrmList.SelectedValu
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
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.