TUGAS 2.2 MEMBUAT HARGA DISCOUNT MENGGUNAKAN KEYPRESS

TUGAS BAHASA PEMROGRAMAN 2.2


TUGAS 2.2



Private Sub cmdhitung_Click()
Txtdis = Val(Txtha) * 0.25
txtak = Val(Txtha) - Val(Txtdis)
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
Txtha = ""
Txtdis = ""
txtak = ""
Txtha.SetFocus
End Sub



Private Sub Txtha_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtdis = Val(Txtha) * 0.25
txtak = Val(Txtha) - Val(Txtdis)
End If
End Sub