Tugas 2.4 Aplikasi Perhitungan Gaji Menggunakan Keypress
Option Explicit
Private Sub Cmdproses_Click()
TxtGK = Val(TxtGP) + (TxtTJ) - Val(TxtPT)
TxtPJ = Val(TxtGK) * 0.1
TxtGD = Val(TxtGK) - Val(TxtPJ)
End Sub
Private Sub cmdulang_Click()
TxtGP = ""
TxtTJ = ""
TxtPT = ""
TxtGK = ""
TxtPJ = ""
TxtGD = ""
TxtGP.SetFocus
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub txtGP_keypress(keyascii As Integer)
If keyascii = 13 Then
TxtTJ.SetFocus
End If
End Sub
Private Sub txtTJ_keypress(keyascii As Integer)
If keyascii = 13 Then
TxtPT.SetFocus
End If
End Sub
Private Sub TxtPT_KeyPress(keyascii As Integer)
If keyascii = 13 Then
TxtGK = Val(TxtGP) + (TxtTJ) - Val(TxtPT)
TxtPJ = Val(TxtGK) * 0.1
TxtGD = Val(TxtGK) - Val(TxtPJ)
End If
End Sub
Tidak ada komentar:
Posting Komentar