Tugas 2.2 perhitungan harga setelah diskon 15% menggunakan keypress
Private Sub cmdhitung_Click()
txtdis = Val(txtha) * 0.15
txthk = Val(txtha) - (txtdis)
End Sub
Private Sub cmdulang_Click()
txtha = ""
txtdis = ""
txthk = ""
txtha.SetFocus
End Sub
Private Sub cmdquit_Click()
Unload Me
End Sub
Private Sub txtha_keypress(keyascii As Integer)
If keyascii = 13 Then
txtdis = Val(txtha) * 0.15
txthk = Val(txtha) - (txtdis)
End If
End Sub
Komentar
Posting Komentar