perhitungan menggunakan keypres

Private Sub cmdhitung_Click()

txtdis = Val(txtha) * 0.1
txtak = Val(txtha) - (txtdis)
End Sub

Private Sub Cmdreset_Click()
txtha = ""
txtdis = ""
txtak = ""
txtha.SetFocus
End Sub

Private Sub Cmd_quitClick()
Unload Me
End Sub


Private Sub txtha_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtdis = Val(txtha) * 0.1
txtak = Val(txtha) - (txtdis)
End If
End Sub                                          

0 komentar: