TUGAS BAHASA PEMROGRAMAN 1.4

TUGAS 1.4

Private Sub CMDLAGI_Click()
TXTN1 = ""
TXTN2 = ""
TXTN3 = ""
TXTN4 = ""
TXTJML = ""
TXTN1.SetFocus

End Sub

Private Sub CMDKELUAR_Click()
Unload Me
End Sub


Private Sub TXTN1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTN2.SetFocus
End If
End Sub


Private Sub TXTN2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTN3.SetFocus
End If
End Sub

Private Sub TXTN3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTN4.SetFocus
End If
End Sub


Private Sub TXTN4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTJML = Val(TXTN1) + Val(TXTN2) + Val(TXTN3) + Val(TXTN4)
End If

End Sub

Share this

Related Posts

Previous
Next Post »