Aplikasi perhitungan harga with Keypress


Private Sub Cmdhitung_Click()
txtdis = Val(txtha) * 0.1
txthak = Val(txtha) - Val(txtdis)

End Sub


Private Sub cmdkeluar_Click()

Unload Me

End Sub

Private Sub cmdulangi_Click()
txtha = ""
txtdis = ""
txthak = ""
txtha.SetFocus
End Sub



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

Komentar

Postingan populer dari blog ini