BAHASA PEMROGRAMAN I

TUGAS 1

 YELI

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdbatal_Click()

txtnpm.SetFocus

txtnpm = “”

txtnama = “”

txtalamat = “”

End Sub

 

Private Sub cmdlagi_Click()

txtnpm.SetFocus

txtnpm = “”

txtnama = “”

txtalamat = “”

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtalamat.SetFocus

End If

End Sub

 

Private Sub txtnpm_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnama.SetFocus

End If

End Sub

 

TUGAS 2

 YELI 2

 

Private Sub cmdkeluar_Click()

Unload Me

End Sub

 

Private Sub cmdbatal_Click()

txtnpm.SetFocus

txtnpm = “”

txtnama = “”

txtalamat = “”

txtagama = “”

txtjeniskelamin = “”

txtnamaayah = “”

txtnamaibu = “”

txtpekerjaanayah = “”

txtpekerjaanibu = “”

End Sub

 

Private Sub cmdlagi_Click()

txtnpm.SetFocus

txtnpm = “”

txtnama = “”

txtalamat = “”

txtagama = “”

txtjeniskelamin = “”

txtnamaayah = “”

txtnamaibu = “”

txtpekerjaanayah = “”

txtpekerjaanibu = “”

End Sub

 

Private Sub txtpekerjaanayah_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtpekerjaanibu.SetFocus

End If

End Sub

 

Private Sub txtnamaibu_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtpekerjaanayah.SetFocus

End If

End Sub

 

Private Sub txtnamaayah_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnamaibu.SetFocus

End If

End Sub

 

Private Sub txtjeniskelamin_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnamaayah.SetFocus

End If

End Sub

 

Private Sub txtagama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtjeniskelamin.SetFocus

End If

End Sub

 

Private Sub txtalamat_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtagama.SetFocus

End If

End Sub

 

Private Sub txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtalamat.SetFocus

End If

End Sub

 

Private Sub txtnpm_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnama.SetFocus

End If

End Sub

 

TUGAS 3

 YELI3

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdbersih_Click()

txtn1.SetFocus

txtn1 = “”

txtn2 = “”

txthasil = “”

End Sub

 

Private Sub cmdhitung_Click()

txthasil = Val(txtn1) * Val(txtn2)

End Sub

 

Private Sub txtn1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtn2.SetFocus

End If

End Sub

 

TUGAS 4

 YELI4

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdbersih_Click()

txtn1.SetFocus

txtn1 = “”

txtn2 = “”

txthasil = “”

End Sub

 

Private Sub cmdhitung_Click()

txthasil = Val(txtn1) * Val(txtn2)

End Sub

 

Private Sub txtn2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txthasil = Val(txtn1) * Val(txtn2)

End If

End Sub

 

Private Sub txtn1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtn2.SetFocus

End If

End Sub

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s