Hello everyone of DaniWeb!! I have an issue with the good old Mortgage Calculator I need to make this list, but i am not sure what i am doing wrong. any help? Here is the assignment
Write the program in VB.Net (not Web based) and have it accept user input of the amount, term and interest rate. Display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. The list will be longer than the screen, so use loops to display a partial list, hesitate, and then display more of the list. Insert comments to document the program.
Here is my code. I am not sure what i am doing wrong. Thanks
Public Class MortCalc
Private Sub clearForm() txtAmount.Text = "Enter Amount" txtRate.Text = "Enter Interest Rate" txtYears.Text = "Enter Years" txtMonthlyPayment.Text = "" End Sub Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close() End Sub Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click 'Calculate the Monthly Payment' Dim dblAmount, dblMonthlyRate, dblMonths, dblMonthlyPayment As Double 'Convert input values to numeric values' dblAmount = CDbl(txtAmount.Text) dblMonthlyRate = CDbl(txtRate.Text) / 100 'allows interest rate to be entered whole number' dblMonths = CDbl(txtYears.Text) 'Format input values' txtAmount.Text = FormatCurrency(dblAmount) txtRate.Text = FormatPercent(dblMonthlyRate) txtYears.Text = FormatNumber(dblMonths) 'Calculate payment' 'Results for listbox should be new loan balance and interest rate' Dim PVal, FVal, mPayments As Integer Dim APR, iPayment, TotInt As Double Dim pPayment, ...