Rabu, 13 Desember 2017

Tugas 3.8

Private Sub Command1_Click()
Dim a As String
a = Mid(Text2, 1, 4)
If a = "2009" Then
Text6 = "2009"
End If
a = Mid(Text2, 5, 1)
If a = "A" Then
Text7 = "Manajer"
Text3 = "A"
Text9 = "4000000"
Text10 = "1025000"
ElseIf a = "B" Then
Text7 = "Ka. Seksi"
Text3 = "B"
Text9 = "3500000"
Text10 = "975000"
ElseIf a = "C" Then
Text7 = "Staff"
Text3 = "C"
Text9 = "3000000"
Text10 = "925000"
End If
a = Mid(Text2, 7, 1)
If a = "S" Then
Text4 = "S"
Text5 = "Single"
ElseIf a = "M" Then
Text4 = "M"
Text5 = "Menikah"
ElseIf a = "J" Then
Text4 = "J"
Text5 = "Janda"
ElseIf a = "D" Then
Text4 = "D"
Text5 = "Duda"
End If
a = Mid(Text2, 9, 3)
If a = "KEU" Then
Text8 = "Accounting"
ElseIf a = "ADM" Then
Text8 = "Administrasi"
ElseIf a = "SDM" Then
Text8 = "General Affair"
ElseIf a = "EDP" Then
Text8 = "IT Unit"
ElseIf a = "SPM" Then
Text8 = "Security"
End If
Text11 = Val(Text9) + Val(Text10)
End Sub

Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Text7 = ""
Text8 = ""
Text9 = ""
Text10 = ""
Text11 = ""
End Sub


Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub


Tidak ada komentar:

Posting Komentar