Tugas 4
Private Sub CMDHITUNG_Click()
TXTTOTAL = Val(TXTNILAI1) + Val(TXTNILAI2)
End Sub
Private Sub CMDKELUAR_Click()
Unload Me
End Sub
Private Sub CMDLAGI_Click()
TXTNILAI1 = ""
TXTNILAI2 = ""
TXTTOTAL = ""
TXTNILAI1.SetFocus
End Sub
TXTNILAI2 = ""
TXTTOTAL = ""
TXTNILAI1.SetFocus
End Sub
Private Sub TXTNILAI1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTNILAI2.SetFocus
End If
End Sub
Private Sub TXTNILAI2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TXTTOTAL = Val(TXTNILAI1) + (TXTNILAI2)
End If
End Sub
Tidak ada komentar:
Posting Komentar