Tugas 2.2 Perhitungan Harga Setelah Diskon 10% Menggunakan Keypress
Option Explicit
Private Sub Cmdhitung_Click()
Txtdis = Val(Txtha) * (0.1)
Txthak = Val(Txtha) - Val(Txtdis)
End Sub
Private Sub cmdlagi_Click()
Txtha = ""
Txtdis = ""
Txthak = ""
Txtha.SetFocus
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub
Txtha_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtdis = Val(Txtha) * (0.1)
Txthak = Val(Txtha) - Val(Txtdis)
End If
End Sub
Tidak ada komentar:
Posting Komentar