TUGAS 2

robby

Private Sub cmdhitung_Click()

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

Text6.Text = Val(Text4.Text) * Val(Text5.Text)

Text9.Text = Val(Text7.Text) / Val(Text8.Text)

Text12.Text = Val(Text10.Text) – Val(Text11.Text)

End Sub

Private Sub cmdbatal_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

Text9.Text = “”

Text10.Text = “”

Text11.Text = “”

Text12.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

Text9.Text = “”

Text10.Text = “”

Text11.Text = “”

Text12.Text = “”

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text11.SetFocus

End If

End Sub

Private Sub Text11_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

cmdhitung.SetFocus

End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5.SetFocus

End If

End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text7.SetFocus

End If

End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text8.SetFocus

End If

End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text10.SetFocus

End If

End Sub

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s