Rabu, 24 April 2013

program” vb.

program” vb.

PT PULANG PETANG
Private Sub Command1_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 = “MANAJER”
Text7.Text = “2500000″
Text8.Text = “625000″
Text12.Text = “BAIK DAN SOPAN”
ElseIf NIK = “B” Then
Text1.Text = “B”
Text5.Text = “KA SEKSI”
Text7.Text = “1500000″
Text8.Text = “375000″
Text12.Text = “BAIK TAPI TIDAK SOPAN”
ElseIf NIK = “C” Then
Text1.Text = “C”
Text5.Text = “STAFF”
Text7.Text = “1000000″
Text8.Text = “250000″
Text12.Text = “TIDAK BAIK DAN TIDAK SOPAN”
End If
TG = Val(Text7.Text) + Val(Text8.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
Command3.SetFocus
End Sub


Private Sub Command2_Click()
Text10.Text = “”
Text11.Text = “”
Text10.SetFocus
End Sub

Private Sub Command3_Click()
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
Text8.Text = “”
Text9.Text = “”
Text10.Text = “”
Text11.Text = “”
Text12.Text = “”
Text10.SetFocus
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Activate()
Text10.SetFocus
End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text11.SetFocus
End If
End Sub

Private Sub Text11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub

Tidak ada komentar:

Posting Komentar