Private Sub cmdbersih_Click()
txtn1.SetFocus
txtn1 = “”
txtn2 = “”
txthasil = “”
End Sub
Private Sub cmdhitung_Click()
txthasil = Val(txtn1) * Val(txtn2)
End Sub
Private Sub cmdkeuar_Click()
Unload Me
End Sub
Private Sub txtn1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtn2.SetFocus
End If
End Sub
Leave a comment