Simple loan calculator
Simple loan calculator
Rate Simple loan calculator
(1(1 Vote))
Text = 48
and Now you place One Check Box.
Name = PayEarly
Caption = Check if early payments
and you Place Two Command Button
Command1 : Name = ShowPayment
Caption = Show Payment
Now If Front of this Command Place One More Text Box
and In Front Of this Place second Command Button
Command2 : Name =bttnExit
Caption =EXIT
Private Sub bttnExit_Click()
End
End Sub
Private Sub ShowPayment_Click()
Dim Payment As Single
Dim LoanIRate As Single
Dim LoanDuration As Integer
Dim LoanAmount As Integer
If IsNumeric(Amount.Text) Then
LoanAmount = Amount.Text
Else
MsgBox "Please enter a valid amount"
Exit Sub
End If
If IsNumeric(IRate.Text) Then
LoanIRate = 0.01 * IRate.Text / 12
Else
MsgBox "Invalid interest rate, please re-enter"
Exit Sub
End If
If IsNumeric(Duration.Text) Then
LoanDuration = Duration.Text
Else
MsgBox "Please specify the loan's duration as a number of months"
Exit Sub
End If
Payment = Pmt(LoanIRate, LoanDuration, -LoanAmount, 0, PayEarly.Value)
txtPmt.Text = Format$(Payment, "#.00")
End Sub
Simple loan calculator Comments
No comments yet — be the first to post one!
Post a Comment