Tugas Praktek 1

 

Private Sub Cmdproses_Click()

Dim NIK As String

Dim TU, GP As Long

Dim TG As Currency

Text4.Text = Mid(Text11, 2, 4)

NIK = Left(Text11, 1)

If NIK = “A” Then

Text1.Text = “A”

Text5.Text = “MANAGER”

Text7.Text = “2500000”

Text8.Text = “625000”

ElseIf NIK = “B” Then

Text1.Text = “B”

Text5.Text = “KA SEKSI”

Text7.Text = “1500000”

Text8.Text = “375000”

ElseIf NIK = “C” Then

Text1.Text = “C”

Text5.Text = “STAFF”

Text7.Text = “1000000”

Text8.Text = “250000”

End If

TG = Val(Text8.Text) + Val(Text7.Text)

Text9.Text = TG

NIK = Mid(Text11, 6, 3)

If NIK = “KEU” Then

Text6.Text = “ACCOUNTING”

ElseIf NIK = “ADM” Then

Text6.Text = “ADMINISTRATION”

ElseIf NIK = “SDM” Then

Text6.Text = “GENERAL AFFAIR”

ElseIf NIK = “EDP” Then

Text6.Text = “IT UNIT”

ElseIf NIK = “SPM” Then

Text6.Text = “SECURITY”

End If

NIK = Right(Text11, 1)

If NIK = “M” Then

Text2.Text = “M”

Text3.Text = “MENIKAH”

ElseIf NIK = “S” Then

Text2.Text = “S”

Text3.Text = “SINGLE”

ElseIf NIK = “J” Then

Text2.Text = “J”

Text3.Text = “JANDA”

ElseIf NIK = “D” Then

Text2.Text = “D”

Text3.Text = “DUDA”

End If

End Sub

 

Private Sub Cmdbatal_Click()

Text10.Text = “”

Text11.Text = “”

Text10.SetFocus

End Sub

 

Private Sub Cmdlagi_Click()

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

Text9.Text = “”

Text10.Text = “”

Text11.Text = “”

Text10.SetFocus

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

 

Private Sub Text10_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text11.SetFocus

End If

End Sub

 

Private Sub Text11_Change()

End Sub

Tinggalkan komentar

Tinggalkan komentar