tugas 3. program14

14

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama = “”

Txtnik = “”

txtgol = “”

Txtkode = “”

Txtstatus = “”

Txttahun = “”

Txtbagian = “”

Txtjabatan = “”

Txtgapok = “”

Txttunjangan = “”

Txttoga = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama = “”

Txtnik = “”

txtgol = “”

Txtkode = “”

Txtstatus = “”

Txttahun = “”

Txtbagian = “”

Txtjabatan = “”

Txtgapok = “”

Txttunjangan = “”

Txttoga = “”

End Sub

Private Sub Cmdproses_Click()

Dim s As String

s = Left(Txtnik.Text, 4)

Txttahun.Text = “2015”

s = Mid(Txtnik.Text, 5, 1)

If s = “A” Then

txtgol.Text = “A”

Txtjabatan.Text = “MANAJER”

Txtgapok.Text = “4000000”

Txttunjangan.Text = “1025000”

ElseIf s = “B” Then

txtgol.Text = “B”

Txtjabatan.Text = “KA.SEKSI”

Txtgapok.Text = “3500000”

Txttunjangan.Text = “975000”

ElseIf s = “C” Then

txtgol.Text = “C”

Txtjabatan.Text = “STAF”

Txtgapok.Text = “3000000”

Txttunjangan.Text = “925000”

End If

s = Mid(Txtnik.Text, 7, 1)

If s = “S” Then

Txtkode.Text = “S”

Txtstatus.Text = “SINGLE”

ElseIf s = “M” Then

Txtkode.Text = “M”

Txtstatus.Text = “MENIKAH”

ElseIf s = “J” Then

Txtkode.Text = “J”

Txtstatus.Text = “JANDA”

ElseIf s = “D” Then

Txtkode.Text = “D”

Txtstatus.Text = “DUDA”

End If

s = Right(Txtnik.Text, 3)

If s = “KEU” Then

Txtbagian.Text = “ACOUNTING”

ElseIf s = “ADM” Then

Txtbagian.Text = “Administrasi”

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

Txttoga.Text = Val(Txtgapok.Text) + Val(Txttunjangan.Text)

End Sub

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s