Kamis, 08 Maret 2018

PROGRAM A

Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdlagi_Click()
txtnk.SetFocus
txtnk = ""
txtnik = ""
txtgol = ""
txtkstat = ""
txtstatus = ""
txttahun = ""
txtjbt = ""
txtbagian = ""
txtgapok = ""
txttunjangan = ""
txttotg = ""
End Sub
Private Sub cmdproses_Click()
Dim V As String
txttahun = Left(txtnik, 4)
V = Mid(txtnik, 7, 1)
If V = "S" Then
txtkstat = "S"
txtstatus = "Single"
ElseIf V = "M" Then
txtkstat = "M"
txtstatus = "Menikah"
ElseIf V = "J" Then
txtkstat = "J"
txtstatus = "Janda"
ElseIf V = "D" Then
txtkstat = "D"
txtstatus = "Duda"
End If
Dim S As String
S = Right(txtnik, 3)
If S = "KEU" Then
txtbagian = "Accounting"
ElseIf S = "ADM" Then
txtbagian = "Administrasi"
ElseIf S = "SDM" Then
txtbagian = "General Affair"
ElseIf S = "EDP" Then
txtbagian = "IT Unit"
ElseIf S = "SPM" Then
txtbagian = "Security"
End If
Dim P As String
P = Mid(txtnik, 5, 1)
If P = "A" Then
txtgol = "A"
txtjbt = "Manajer"
txtgapok = "4000000"
txttunjangan = "1025000"
ElseIf P = "B" Then
txtgol = "B"
txtjbt = "Ka.Seksi"
txtgapok = "3500000"
txttunjangan = "975000"
ElseIf P = "C" Then
txtgol = "C"
txtjbgt = "Staff"
txtgapok = "3000000"
txttunjangan = "925000"
End If
txttotg = Val(txtgapok) + Val(txttunjangan)
End Sub
Private Sub cmpbatal_Click()
txtnk.SetFocus
txtnk = ""
txtnik = ""
txtgol = ""
txtkstat = ""
txtstatus = ""
txttahun = ""
txtjbt = ""
txtbagian = ""
txtgapok = ""
txttunjangan = ""
txttotg = ""
End Sub
Private Sub txtnk_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If
End Sub

Tidak ada komentar:

Posting Komentar