TUGAS A

Private Sub cmdbatal_Click()
txtnk.SetFocus
txtnk = ""
txtnik = ""
txtgol = ""
txtkostat = ""
txtstatus = ""
txtth = ""
txtjbt = ""
txtbagian = ""
txtgapok = ""
txttjn = ""
txttotg = ""
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnk.SetFocus
txtnk = ""
txtnik = ""
txtgol = ""
txtkostat = ""
txtstatus = ""
txtth = ""
txtjbt = ""
txtbagian = ""
txtgapok = ""
txttjn = ""
txttotg = ""
End Sub

Private Sub cmdproses_Click()
Dim V As String
txtth = Left(txtnik, 4)
V = Mid(txtnik, 7, 1)
If V = "S" Then
txtkostat = "S"
txtstatus = "Single"
ElseIf V = "M" Then
txtkostat = "M"
txtstatus = "Menikah"
ElseIf V = "J" Then
txtkostat = "J"
txtstatus = "Janda"
ElseIf V = "D" Then
txtkostat = "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"
txttjn = "1025000"
ElseIf P = "B" Then
txtgol = "B"
txtjbt = "ka.seksi"
txtgapok = "3500000"
txttjn = "975000"
ElseIf P = "C" Then
txtgol = "C"
txtjbt = "staff"
txtgapok = "3000000"
txttjn = "925000"
End If
txttotg = Val(txtgapok) + Val(txttjn)
End Sub

Private Sub txtnk_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnik.SetFocus
End If
End Sub

Komentar

Postingan Populer