You are on page 1of 3

Jawaban Form_1 Sub bersih() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.

Text = "" End Sub Private Sub Command1_Click() Dim jumlah As Double jumlah = Val(Text1.Text) * (1 + Val(Text2.Text) / 100) ^ Val(Text3.Text) Text4.Text = jumlah End Sub Private Sub Command2_Click() Call bersih Text1.SetFocus End Sub Private Sub Command3_Click() Unload Me Form2.Show Form3.Hide End Sub Jawaban Form_2 Sub bersih() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" End Sub Private Sub Command1_Click() Dim jumlah As Double Dim r1, r2, r3, r4, r5 As Double If Text1.Text = "" Then MsgBox "Nama User tidak boleh kosong brow....", vbInformation, "Informasi" Call bersih Text1.SetFocus Exit Sub End If If Text2.Text = "" Then MsgBox "Nama User tidak boleh kosong brow....", vbInformation, "Informasi" Call bersih Text2.SetFocus

Exit Sub End If If Text3.Text = "" Then MsgBox "Nama User tidak boleh kosong brow....", vbInformation, "Informasi" Call bersih Text3.SetFocus Exit Sub End If r1 = Val(Text3.Text) - 1 r2 = Val(Text2.Text) / 100 r3 = (1 + r2) ^ r1 r4 = r3 - 1 r5 = r2 * r3 jumlah = Val(Text1.Text) + (Val(Text1.Text) * (r4 / r5)) Text4.Text = jumlah End Sub Private Sub Command2_Click() Call bersih Text1.SetFocus End Sub Private Sub Command3_Click() Unload Me Form2.Show Form4.Hide End Sub

Jawaban form_3 Sub bersih() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" End Sub Private Sub Command1_Click() Dim jumlah As Double Dim r1, r2, r3, r4 As Integer If Text1.Text = "" Then MsgBox "Nama User tidak boleh kosong brow....", vbInformation, "Informasi" Call bersih Text1.SetFocus Exit Sub End If

If Text2.Text = "" Then MsgBox "Nama User tidak boleh kosong brow....", vbInformation, "Informasi" Call bersih Text2.SetFocus Exit Sub End If If Text3.Text = "" Then MsgBox "Nama User tidak boleh kosong brow....", vbInformation, "Informasi" Call bersih Text3.SetFocus Exit Sub End If r1 = Val(Text2.Text) / 100 r2 = (1 + r1) ^ Val(Text3.Text) r3 = r2 - 1 r4 = r1 * r2 jumlah = Val(Text1.Text) * ((r1 * r2) / r3) Text4.Text = jumlah End Sub Private Sub Command2_Click() Call bersih Text1.SetFocus End Sub Private Sub Command3_Click() Unload Me Form2.Show Form5.Hide End Sub

You might also like