TUGAS 4

Private Sub cmdhitung_Click()
Txttotal = Val(Txtn1) + (Txtn2)
End Sub

Private Sub cmdkluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
Txtn1 = ""
Txtn2 = ""
Txttotal = ""
Txtn1.SetFocus
End Sub



Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtn2.SetFocus
End If
End Sub



Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txttotal = Val(Txtn1) + (Txtn2)
End If
End Sub

Komentar

Postingan Populer