I need help getting a VB mortgage calculator...
...code right.? Here is what I have so far.Dim decAmount As Decimal Dim dblInterest As Double Dim decInterest As Decimal Dim decYears As Decimal Dim decPayment As Decimal decAmount = Convert.ToDecimal(txtAmount.Text) 'convert to decimal decInterest = Convert.ToDecimal(txtInterest.Text) / (100 * 12) decYears = Convert.ToDecimal(txtYears.Text) * 12 decPayment = Convert.ToDecimal(txtPayment.Text) decPayment = decAmount* decInterest(1 + decInterest) ^ 12 * decInterest / ((1 + decInterest) - 1)) txtPayment.Text = FormatCurrency(decPayment) txtPayment.Text = Convert.ToString(decPayment) Please help what am I doing wrong?
|