-->

Tugas 1 Program 6

Private Sub txtinput1_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput2.SetFocus
End If
End Sub
Private Sub txtinput2_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput3.SetFocus
End If
End Sub
Private Sub txtinput3_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput4.SetFocus
End If
End Sub
Private Sub txtinput4_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput5.SetFocus
End If
End Sub
Private Sub txtinput5_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput6.SetFocus
End If
End Sub
Private Sub txtinput6_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput7.SetFocus
End If
End Sub
Private Sub txtinput7_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtinput8.SetFocus
End If
End Sub
Private Sub txtinput8_keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
txthasil1 = Val(Txtinput1) + (Txtinput2)
txthasil2 = Val(Txtinput3) / (Txtinput4)
txthasil3 = Val(Txtinput5) - (Txtinput6)
txthasil4 = Val(Txtinput7) * (Txtinput8)
hasil1 = Val(txthasil1) + Val(txthasil2) + Val(txthasil3) + Val(txthasil4)
End If
End Sub

0 komentar:

Posting Komentar