Tugas 2.4 aplikasi perhitungan gajih menggunakan keypress
Private Sub cmdproses_Click()
txtgaji = Val(txtpokok) + Val(txttunjangan) -
Val(txtpotongan)
txtpajak = Val(txtgaji) * 0.05
txtgadit = Val(txtgaji) - Val(txtpajak)
End Sub
Private Sub cmdkeluar_Click()
Unload Me
End Sub
Private Sub cmdulang_Click()
txtpokok = ""
txttunjangan = ""
txtpotongan = ""
txtgaji = ""
txtpajak = ""
txtgadit = ""
txtpokok.SetFocus
End Sub
Private Sub txtpokok_keypress(keyascii As Integer)
If keyascii = 13 Then
txttunjangan.SetFocus
End If
End Sub
Private Sub txttunjangan_keypress(keyascii As Integer)
If keyascii = 13 Then
txtpotongan.SetFocus
End If
End Sub
Private Sub txtpotongan_keypress(keyascii As Integer)
If keyascii = 13 Then
txtgaji = Val(txtpokok) + Val(txttunjangan) -
Val(txtpotongan)
txtpajak = Val(txtgaji) * 0.05
txtgadit = Val(txtgaji) - Val(txtpajak)
End If
End Sub
Komentar
Posting Komentar