Rabu, 22 November 2017

Tugas 2 Program 4 Bp1



Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdproses_Click()
txtgajik = Val(txtgajip) + Val(txttn) - Val(txtpotongan)
txtpajak = Val(txtgajik) * 0.05
txtgajid = Val(txtgajik) - Val(txtpajak)
End Sub

Private Sub cmdulang_Click()
txtgajip = ""
txttn = ""
txtpotongan = ""
txtgajik = ""
txtpajak = ""
txtgajid = ""
txtgajip.SetFocus
End Sub

Private Sub txtgajip_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttn.SetFocus
End If
End Sub

Private Sub txtpotongan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtgajid.SetFocus
txtgajik = Val(txtgajip) + Val(txttn) - Val(txtpotongan)
txtpajak = Val(txtgajik) * 0.05
txtgajid = Val(txtgajik) - Val(txtpajak)
End If
End Sub

Private Sub txttn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtpotongan.SetFocus
End If
End Sub

Tidak ada komentar:

Posting Komentar