UTS (TEORI)

 

KODE PROGRAM:

 

Private Sub CMDPROSES_Click()

Dim s As String

s = Mid(txtnik.Text, 9, 1)

If s = “A” Then

txtgolongan.Text = “A”

txtjabatan.Text = “MANAGER”

txtgapok.Text = “3000000”

txttunjangan.Text = “875000”

 

ElseIf s = “B” Then

txtgolongan.Text = “B”

txtjabatan.Text = “KA SEKSI”

txtstatus.Text = “2500000”

txttunjangan.Text = “525000”

 

ElseIf s = “C” Then

txtgolongan.Text = “C”

txtjabatan.Text = “staff”

txtgapok.Text = “2000000”

txttunjangan.Text = “325000”

 

End If

 

s = Left(txtnik.Text, 3)

If s = “KEU” Then

txtjabatan.Text = “ACCOUNTING”

ElseIf s = “ADM” Then

txtbagian.Text = “ADMINISTRATION”

ElseIf s = “SDM” Then

txtbagian.Text = “GENERAL AFFAIR”

ElseIf s = “EDP” Then

txtbagian.Text = “IT UNIT”

ElseIf s = “SPM” Then

txtbagian.Text = “SECURITY”

End If

 

s = Right(txtnik.Text, 1)

If s = “S” Then

txtkodestatus.Text = “S”

txtstatus.Text = “SINGLE”

ElseIf s = “M” Then

txtkodestatus.Text = “M”

txtstatus.Text = “MENIKAH”

ElseIf s = “D” Then

txtkodestatus.Text = “D”

txtstatus.Text = “DUDA”

ElseIf s = “J” Then

txtkodestatus.Text = “J”

txtstatus.Text = “JANDA”

End If

 

s = Mid(txtnik.Text, 5, 4)

txttahun.Text = s

txttotalgaji.Text = Val(txtgapok.Text) + Val(txttunjangan.Text)

End Sub

 

Private Sub Command2_Click()

txtnama.Text = “”

txtnama.SetFocus

txtnik = “”

txtgolongan = “”

txtkodestatus = “”

txttahun = “”

txtjabatan = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotalgaji.Text = “”

txtstatus.Text = “”

End Sub

 

Private Sub Command3_Click()

txtnama.Text = “”

txtnama.SetFocus

txtnik = “”

txtgolongan = “”

txtkodestatus = “”

txttahun = “”

txtjabatan = “”

txtbagian = “”

txtgapok = “”

txttunjangan = “”

txttotalgaji.Text = “”

txtstatus = “”

End Sub

 

Private Sub Command4_Click()

End

End Sub

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: