Cara kerja dari aplikasi ini adalah mengentri jumlah tabungan kemudian sistem memproses bunga dan pajak dari tabungan tersebut, untuk tidak berpanjang lebar berikut tampilan yang harus dibuat di form.
Lalu masukkan source code berikut:
Private Sub Command1_Click() Dim a As Long Text1.Enabled = False Text2.Text = Text1.Text a = Text2.Text If (a < "1000000") Then Text3.Text = "Bunga 10% Per Tahun" Text4.Text = a * 0.0083 Text7.Text = Text4.Text * 12 ElseIf (a >= "1000000") Then Text3.Text = "Bunga 15% Per tahun" Text4.Text = a * 0.0125 Text7.Text = Text4.Text * 12 End If End Sub Private Sub Command2_Click() Dim a As Long a = Text2.Text If (a < "1000000") Then Text5.Text = (Text4.Text + a) * 0.004167 Text8.Text = Text5.Text * 12 ElseIf (a >= "1000000") Then Text5.Text = (Text4.Text + a) * 0.0125 Text8.Text = Text5.Text * 12 Text6.Text = (Text4.Text + a) - Text5.Text End If End Sub Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text1.Enabled = True End Sub Private Sub Text5_Change() On Error Resume Next Dim a As Long a = Text2.Text Text6.Text = (Text4.Text + a) - Text5.Text End Sub Private Sub Text6_Change() On Error Resume Next Dim a As Long Dim b As Long a = Text2.Text b = Text8.Text Text9.Text = (a + Text7.Text) - b End Sub
Demikian semoga bermanfaat.
Salam sepuluh Ribu jam Untuk Expert.... ^_^
No comments :
Post a Comment