How To Make A Loan Calculator In VB.NET

this tutorial is about making a loan calculator its just a simple one so you dont have to waste alot time to make it so lets get started

1.open your visual basic 2008/2010

2.make a new project and name it whatever you want

3.add 4 labels and change the text property of them as below

label1 - amount
label2 - interest rate
label3 - duration
label4 - monthly payment

4.now add 4 textboxes

5.set the labels and textboxes as given below




6.now add a checkbox and change the text property to Early Payment

7.add a button and change its text property to Calculate

8.double click your form and add this code


Public Class Form1

    'Author : Mohamed Shimran
    'Blog : http://www.ultimateprogrammingtutorials.blogspot.com

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim Payment As Double
        Dim LoanIRate As Double
        Dim LoanDuration As Integer
        Dim LoanAmount As Integer

        LoanAmount = Convert.ToInt32(TextBox1.Text)
        LoanIRate = 0.01 * Convert.ToDecimal(TextBox2.Text) / 12
        LoanDuration = Convert.ToInt32(TextBox3.Text)
        Dim payEarly As DueDate
        If CheckBox1.Checked Then
            payEarly = DueDate.BegOfPeriod
        Else
            payEarly = DueDate.EndOfPeriod
        End If
        Payment = Pmt(LoanIRate, LoanDuration, -LoanAmount, 0, payEarly)
        TextBox4.Text = Payment.ToString("#.00")
        TextBox4.Enabled = True
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBox4.Enabled = False
    End Sub
End Class


9.now debug you made a loan calculator

6 comments

please send me this .exe file to ranshanf@yahoo.com

Reply

how to download it ?

Reply

Fides Invest AG bietet Leasing ohne Bank. Ist Ihr Kredit-Rating ist nicht über jeden Zweifel erhaben? Wenn Ihr Budget es zulässt, können Sie ein Auto bei uns leasen.
Leasing ohne Bank

Reply

how can i run my developed application using .exe file.
i cannot run. it only runs in visual studio 2010.

Reply

Thanks for posting this code of Loan Calculator

Reply

Post a Comment

Note: Only a member of this blog may post a comment.