TUGAS 4 yang ke14

LINTANG14

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Txtmnk.SetFocus

Txtmnk.Text = “”

Txtmn.Text = “”

Txtgol.Text = “”

Txtks.Text = “”

Txts.Text = “”

Txtt.Text = “”

Txtj.Text = “”

Txtb.Text = “”

Txtgapok.Text = “”

Txttnj.Text = “”

Txttotal.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim r As String

 

r = Mid(Txtmn.Text, 5, 1)

If r = “A” Then

Txtgol = “A”

Txtj.Text = “MANAGER”

Txtgapok.Text = “4000000”

Txttnj.Text = “1025000”

ElseIf r = “B” Then

Txtgol.Text = “B”

Txtj.Text = “Ka.SEKSI”

Txtgapok.Text = “3500000”

Txttnj.Text = “975000”

ElseIf r = “C” Then

Txtgol.Text = “C”

Txtj.Text = “STAFF”

Txtgapok.Text = “3000000”

Txttnj.Text = “925000”

End If

r = Right(Txtmn.Text, 3)

If r = “KEU” Then

Txtb.Text = “ACCOUNTING”

ElseIf r = “ADM” Then

Txtb.Text = “ADMINISTRASI”

ElseIf r = “SDM” Then

Txtb.Text = “GENERAL AFFAIR”

ElseIf r = “EDP” Then

Txtb.Text = “IT UNIT”

ElseIf r = “SPM” Then

Txtb.Text = “SECURITY”

End If

r = Mid(Txtmn.Text, 7, 1)

If r = “S” Then

kode = “S”

Status = “SINGEL”

ElseIf r = “M” Then

kode = “M”

Status = “MENIKAH”

ElseIf r = “J” Then

kode = “J”

Status = “JANDA”

ElseIf r = “D” Then

kode = “D”

Status = “DUDA”

End If

Txtks.Text = kode

Txts.Text = Status

Txtt.Text = Left(Txtmn.Text, 4)

Txttotal.Text = Val(Txtgapok.Text) + Val(Txttnj.Text)

End Sub

 

Private Sub Form_Activate()

Txtmnk.SetFocus

End Sub

 

Private Sub txtmnk_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtmn.SetFocus

End If

End Sub

 

Private Sub cmdbatal_Click()

Txtmnk.SetFocus

Txtmnk.Text = “”

Txtmn.Text = “”

Txtgol.Text = “”

Txtks.Text = “”

Txts.Text = “”

Txtt.Text = “”

Txtj.Text = “”

Txtb.Text = “”

Txtgapok.Text = “”

Txttnj.Text = “”

Txttotal.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 )

w

Connecting to %s