tugas 9

IMG_20160103_215257

Private Sub kosong()

Textnama.SetFocus

Textnama.Text = “”

Textnik.Text = “”

Textgol.Text = “”

Textkode.Text = “”

Textsts.Text = “”

Textthn.Text = “”

Textjbt.Text = “”

Textbgn.Text = “”

Textgapok.Text = “”

Texttun.Text = “”

Texttot.Text = “”

End Sub

 

Private Sub Cmdbatal_Click()

kosong

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

kosong

End Sub

 

Private Sub Cmdproses_Click()

Dim b As String

b = Mid(Textnik.Text, 5, 1)

If b = “A” Then

Textgol.Text = “A”

Textjbt.Text = “Manajer”

Textgapok.Text = “4000000”

Texttun.Text = “1025000”

ElseIf b = “B” Then

Textgol.Text = “B”

Textjbt.Text = “Kepala Seksi”

Textgapok.Text = “3500000”

Texttun.Text = “975000”

ElseIf b = “C” Then

Textgol.Text = “C”

Textjbt.Text = “Staff”

Textgapok.Text = “3000000”

Texttun.Text = “925000”

End If

b = Mid(Textnik.Text, 7, 1)

If b = “S” Then

Textkode.Text = “S”

Textsts.Text = “Single”

ElseIf b = “M” Then

Textkode.Text = “M”

Textsts.Text = “Menikah”

ElseIf b = “J” Then

Textkode.Text = “J”

Textsts.Text = “Janda”

ElseIf b = “D” Then

Textkode.Text = “D”

Textsts.Text = “Duda”

End If

b = Mid(Textnik.Text, 9, 3)

If b = “KEU” Then

Textbgn.Text = “Accounting”

ElseIf b = “ADM” Then

Textbgn.Text = “Administrasi”

ElseIf b = “SDM” Then

Textbgn.Text = “General Affair”

ElseIf b = “EDP” Then

Textbgn.Text = “IT Unit”

ElseIf b = “SPM” Then

Textbgn.Text = “Security”

End If

Textthn.Text = Left(Textnik.Text, 4)

Texttot.Text = Val(Textgapok) + Val(Texttun)

End Sub

 

Private Sub Form_Activate()

Textnama.SetFocus

Textnama.Text = “”

Textnik.Text = “”

Textgol.Text = “”

Textkode.Text = “”

Textsts.Text = “”

Textthn.Text = “”

Textjbt.Text = “”

Textbgn.Text = “”

Textgapok.Text = “”

Texttun.Text = “”

Texttot.Text = “”

End Sub

 

Private Sub Textnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnik.SetFocus

End If

End Sub

Standard

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s