Skip to main content

Loan calculator using Pmt function in VB.NET.

PROPERTIES:
label1
TextLoan Ammount
label2
TextRate(Year)
label3
TextPayment Periods(Year)
Button1
TextCompute
CODEING:
Public Class Form1
    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged, TextBox2.TextChanged
        If Not IsNumeric(TextBox1.Text) Then
            TextBox1.Text = ""
        End If
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        MsgBox("Monthly Payment:" & Pmt((Val(TextBox2.Text) / 100) / 12, CInt(NumericUpDown1.Value) * 12, -CInt(TextBox1.Text)))
    end sub
End Class
DESIGNING:


Comments