Halloween party ideas 2015







THIS IS THE PROPERTY SETTINGS FOR CONTROLS
Form1:
BorderStyle 1-Fixed Single
Caption Savings Account
Name frmSavings
Label1:
Caption Monthly Deposit
Label2:
Caption Yearly Interest
Label3:
Caption Number of Months
Label4:
Caption Final Balance
Text1:
Text [Blank]
Name txtDeposit
Text2:
Text [Blank]
Name txtInterest
Text3:
Text [Blank]
Name txtMonths
Text4:
Text [Blank]
Name txtFinal
Command1:
Caption &Calculate
Name cmdCalculate
Command2:
Caption E&xit
Name cmdExit


BELOW IS THE CODE

Dim Deposit As Single
Dim Interest As Single
Dim Months As Single
Dim Final As Single

Private Sub cmdCalculate_Click ()
Dim IntRate As Single

Deposit = Val(txtDeposit.Text)
Interest = Val(txtInterest.Text)
IntRate = Interest / 1200
Months = Val(txtMonths.Text)

Final = Deposit * ((1 + IntRate) ^ Months - 1) / IntRate
txtFinal.Text = Format(Final, "#####0.00")
End Sub

Post a Comment

Powered by Blogger.