tugas 2.2 perhitungan setelah discon 10% menggunakan keypress

tugas 2.2
Private Sub cmdhitung_Click()
Txtdis = Val(txtha) * 0.1
Txtak = Val(txtha) - (Txtdis)
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdulang_Click()
txtha = ""
Txtdis = ""
Txtak = ""
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


Komentar