Private Sub BATAL_Click()
Textn1 = ""
Textn2 = ""
Textn3 = ""
Textn4 = ""
Textn5 = ""
Textn6 = ""
Textn7 = ""
Textn8 = ""
Texttotal1 = ""
Texttotal2 = ""
Texttotal3 = ""
Texttotal4 = ""
Textn1.SetFocus
End Sub
Private Sub HITUNG_Click()
Texttotal1 = Val(Textn1) + Val(Textn2)
Texttotal2 = Val(Textn3) / Val(Textn4)
Texttotal3 = Val(Textn5) - Val(Textn6)
Texttotal4 = Val(Textn7) * Val(Textn8)
End Sub
Private Sub KELUAR_Click()
Unload Me
End Sub
Private Sub LAGI_Click()
Textn1 = ""
Textn2 = ""
Textn3 = ""
Textn4 = ""
Textn5 = ""
Textn6 = ""
Textn7 = ""
Textn8 = ""
Texttotal1 = ""
Texttotal2 = ""
Texttotal3 = ""
Texttotal4 = ""
Textn1.SetFocus
End Sub
Private Sub Textn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn2.SetFocus
End If
End Sub
Private Sub Textn2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn3.SetFocus
End If
End Sub
Private Sub Textn3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn4.SetFocus
End If
End Sub
Private Sub Textn4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn5.SetFocus
End If
End Sub
Private Sub Textn5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn6.SetFocus
End If
End Sub
Private Sub Textn6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn7.SetFocus
End If
End Sub
Private Sub Textn7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textn8.SetFocus
End If
End Sub
Private Sub Textn8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Texttotal1 = Val(Textn1) + Val(Textn2)
Texttotal2 = Val(Textn3) / Val(Textn4)
Texttotal3 = Val(Textn5) - Val(Textn6)
Texttotal4 = Val(Textn7) * Val(Textn8)
End If
End Sub
Komentar
Posting Komentar