Tugas 6
Private Sub cmdhitung_Click()
txtjumlah1 = Val(txt1) + (txt2)
txtjumlah2 = Val(Txt3) / (txt4)
txtjumlah3 = Val(txt5) - (txt6)
txtjumlah4 = Val(txt7) * (txt8)
End Sub
Private Sub cmdbatal_click()
txt1 = ""
txt2 = ""
Txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txtjumlah1 = ""
txtjumlah2 = ""
txtjumlah3 = ""
txtjumlah4 = ""
txt1.SetFocus
End Sub
Private Sub cmdlagi_Click()
txt1 = ""
txt2 = ""
Txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txtjumlah1 = ""
txtjumlah2 = ""
txtjumlah3 = ""
txtjumlah4 = ""
txt1.SetFocus
End Sub
Private Sub cmdkeluar_click()
Unload Me
End Sub
If keyascii = 13 Then
txt2.SetFocus
End If
End Sub
Private Sub txt2_keypress(keyascii As Integer)
If keyascii = 13 Then
Txt3.SetFocus
End If
End Sub
Private Sub txt3_keypress(keyascii As Integer)
If keyascii = 13 Then
txt4.SetFocus
End If
End Sub
Private Sub txt4_keypress(keyascii As Integer)
If keyascii = 13 Then
txt5.SetFocus
End If
End Sub
Private Sub txt5_keypress(keyascii As Integer)
If keyascii = 13 Then
txt6.SetFocus
End If
End Sub
Private Sub txt6_keypress(keyascii As Integer)
If keyascii = 13 Then
txt7.SetFocus
End If
End Sub
Private Sub txt7_keypress(keyascii As Integer)
If keyascii = 13 Then
txt8.SetFocus
End If
End Sub
Private Sub txt8_keypress(keyascii As Integer)
If keyascii = 13 Then
txtjumlah1 = Val(txt1) + (txt2)
txtjumlah2 = Val(Txt3) / (txt4)
txtjumlah3 = Val(txt5) - (txt6)
txtjumlah4 = Val(txt7) * (txt8)
End If
End Sub
Tidak ada komentar:
Posting Komentar