PT. PULANG PETANG SETIAP HARI

ZZ

Private Sub txtnama_keypress(keyascii As Integer)
If keyascii = 13 Then
TXTNIK.SetFocus
End If
End Sub

Private Sub cmdproses_Click()
TXTTAHUN = Left(TXTNIK.Text, 4)
G = Mid(TXTNIK.Text, 5, 1)
If G = “A” Then
TXTGOL = “A”
TXTJABATAN = “Manager”
TXTGAPOK = “4000000”
TXTTUN = “1025000”
ElseIf G = “B” Then
TXTGOL = “B”
TXTJABATAN = “Ka.Seksi”
TXTGAPOK = “3500000”
TXTTUN = “975000”
ElseIf G = “C” Then
TXTGOL = “C”
TXTJABATAN = “Staff”
TXTGAPOK = “3000000”
TXTTUN = “925000”
End If
S = Mid(TXTNIK.Text, 7, 1)
If S = “S” Then
TXTKODE = “S”
TXTSTATUS = “Single”
ElseIf S = “M” Then
TXTKODE = “M”
TXTSTATUS = “Menikah”
ElseIf S = “J” Then
TXTKODE = “J”
TXTSTATUS = “Janda”
ElseIf S = “D” Then
TXTKODE = “D”
TXTSTATUS = “Duda”
End If
B = Right(TXTNIK.Text, 3)
If B = “KEU” Then
TXTBAGIAN = “Accounting”
ElseIf B = “ADM” Then
TXTBAGIAN = “Administrasi”
ElseIf B = “SDM” Then
TXTBAGIAN = “General Affair”
ElseIf B = “EDP” Then
TXTBAGIAN = “IT Unit”
ElseIf B = “SPM” Then
TXTBAGIAN = “Security”
End If
TXTTOTAL = Val(TXTGAPOK.Text) + Val(TXTTUN.Text)
End Sub

Private Sub cmdlagi_Click()
TXTNAMA.SetFocus
TXTNAMA = “”
TXTNIK = “”
TXTGOL = “”
TXTKODE = “”
TXTSTATUS = “”
TXTTH = “”
TXTJABATAN = “”
TXTBAGIAN = “”
TXTGAPOK = “”
TXTTUN = “”
TXTTOTAL = “”
End Sub
Private Sub cmdbatal_Click()
TXTNAMA.SetFocus
TXTNAMA = “”
TXTNIK = “”
TXTGOL = “”
TXTKODE = “”
TXTSTATUS = “”
TXTTHN = “”
TXTJABATAN = “”
TXTBAGIAN = “”
TXTGAPOK = “”
TXTTUN = “”
TXTTOTAL = “”
End Sub

Private Sub cmdkeluar_Click()
p = MsgBox(“Anda yakin akan keluar”, vbQuestion + vbOKCancel, “informasi”)
If p = vbOK Then
End
End If
End Sub

ENTRI PENJUALAN LAPTOP APPLE

QW

Private Sub cbokode_Click()
txtjj.SetFocus
End Sub
Private Sub cmdproses_Click()
Dim penjualan, discount, kode, merk, bayar, a, b As String
Dim harga As Variant
kode = Mid(cbokode.Text, 7, 5)
If kode = “MC965” Then
merk = “Apple MacBook Air MC965”
harga = “12800000”
ElseIf kode = “MC966” Then
merk = “Apple MacBook Air MC966”
harga = “15800000”
ElseIf kode = “MC968” Then
merk = “Apple MacBook Air MC968”
harga = “9900000”
ElseIf kode = “MC969” Then
merk = “Apple MacBook Air MC969”
harga = “11900000”
ElseIf kode = “MC700” Then
merk = “Apple MacBook Air MC700”
harga = “10800000”
ElseIf kode = “MC721” Then
merk = “Apple MacBook Air MC721”
harga = “15900000”
ElseIf kode = “MC723 ” Then
merk = “Apple MacBook Air MC723”
harga = “19300000”
ElseIf kode = “MC724” Then
merk = “Apple MacBook Air MC724”
harga = “13700000”
ElseIf kode = “MC311” Then
merk = “Apple MacBook Air MC311”
harga = “24200000”
ElseIf kode = “MC313” Then
merk = “Apple MacBook Air MC313”
harga = “11900000”
ElseIf kode = “MC314” Then
merk = “Apple MacBook Air MC314”
harga = “14700000”
ElseIf kode = “MC318” Then
merk = “Apple MacBook Air MC318”
harga = “17600000”
ElseIf kode = “MC322” Then
merk = “Apple MacBook Air MC322”
harga = “21300000”
ElseIf kode = “MC965” Then
merk = “Apple MacBook Air MC965”
harga = “12800000”
ElseIf kode = “MC966” Then
merk = “Apple MacBook Air MC966”
harga = “15800000”
End If
txtmerk.Text = merk
txths.Text = harga
a = Val(txtjj.Text)
b = Val(txths.Text)
penjualan = a * b
txthp.Text = penjualan
Select Case txthp.Text
Case Is > 140000000
discount = 0.15 * penjualan
Case Is > 135000000
discount = 0.1 * penjualan
Case Is > 130000000
discount = 0.05 * penjualan
Case Is > 125000000
discount = 0.02 * penjualan
End Select
penjualan = Val(txthp.Text)
txtdis.Text = discount
txttb.Text = Val(txthp.Text) – Val(txtdis.Text)
End Sub
Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtmerk.Text = “”
txths.Text = “”
txtjj.Text = “”
txtdis.Text = “”
txttb.Text = “”
txthp.Text = “”
End Sub
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub Form_Load()
cbokode.AddItem “Apple MC965 MasBook Air”
cbokode.AddItem “Apple MC966 MasBook Air”
cbokode.AddItem “Apple MC968 MasBook Air”
cbokode.AddItem “Apple MC969 MasBook Air”
cbokode.AddItem “Apple MC700 MasBook Pro”
cbokode.AddItem “Apple MC721 MasBook Pro”
cbokode.AddItem “Apple MC723 MasBook Pro”
cbokode.AddItem “Apple MC724 MasBook Pro”
cbokode.AddItem “Apple MC311 MasBook Pro”
cbokode.AddItem “Apple MC313 MasBook Pro”
cbokode.AddItem “Apple MC314 MasBook Pro”
cbokode.AddItem “Apple MC318 MasBook Pro”
cbokode.AddItem “Apple MC322 MasBook Pro”
cbokode.AddItem “Apple MC965 MasBook Air”
cbokode.AddItem “Apple MC966 MasBook Air”
End Sub

NIDN,NAMA PEGAWAI

NIDNQW

Private Sub cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case cbogolongan.Text
Case “I”
gapok = 1500000
tunjangan = 150000
Case “II”
gapok = 2000000
tunjangan = 200000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 3000000
tunjangan = 300000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
Txtgapok.Text = gapok
Txttunjangan.Text = tunjangan
Txtpajak.Text = pajak
Txttotal.Text = total – pajak
End Sub

Private Sub CMDBATAL_Click()
kosong
End Sub

Private Sub CMDLAGI_Click()
kosong
End Sub

Private Sub CMDKELUAR_Click()
End
End Sub

Private Sub Form_Load()
cbogolongan.AddItem “I”
cbogolongan.AddItem “II”
cbogolongan.AddItem “III”
cbogolongan.AddItem “IV”
End Sub
Public Sub kosong()
Txtnidn.SetFocus
Txtnidn.Text = “”
Txtnama.Text = “”
cbogolongan.Text = “”
Txtgapok.Text = “”
Txttunjangan.Text = “”
Txtpajak.Text = “”
Txttotal.Text = “”
End Sub

Private Sub Txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnama.SetFocus
End If
End Sub

NAMA DAN NPM

Untitled

Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjurusan.Text = “”
Txtps.Text = “”
Txttm.Text = “”
Txtnu.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjurusan.Text = “”
Txtps.Text = “”
Txttm.Text = “”
Txtnu.Text = “”
End Sub

Private Sub Cmdproses_Click()
Dim B As String
Txttm.Text = “20” & Left(Txtnpm.Text, 2)
B = Mid(Txtnpm.Text, 3, 1)
If B = “1” Then
Txtjurusan.Text = “Sistem Informasi”
ElseIf B = “2” Then
Txtjurusan.Text = “Manajemen Informatika”
ElseIf B = “3” Then
Txtjurusan.Text = “Tehnik Informatika”
ElseIf B = “4” Then
Txtjurusan.Text = “Manajemen & Komp. Akuntansi”
End If
B = Mid(Txtnpm.Text, 4, 2)
If B = “01” Then
Txtps.Text = “Strata Satu”
ElseIf B = “02” Then
Txtps.Text = “Diploma Tiga”
ElseIf B = “03” Then
Txtps.Text = “Diploma Empat”
ElseIf B = “04” Then
Txtps.Text = “Diploma Dua”
End If
Txtnu.Text = Right(Txtnpm.Text, 3)
End Sub

Private Sub Form_Activate()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtjurusan.Text = “”
Txtps.Text = “”
Txttm.Text = “”
Txtnu.Text = “”
End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnpm.SetFocus
End If
End Sub

TULIS NAMA ANDA

Untitled

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check2.Value
End Sub
Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed
End Sub

tugas(penjualan harga tiket)

Untitled

Private Sub CMDKELUAR_Click()
Unload Me
End Sub

Private Sub CMDLAGI_Click()
TXTKT.SetFocus
TXTHT = “”
TXTJK = “”
TXTJB = “”
TXTJT = “”
TXTTOTALP = “”
End Sub

Private Sub CMDPROSES_Click()
Dim jenis, harga, jam As String
Select Case TXTKT.Text
Case Is = “BIM”
jenis = “BIMA”
harga = “50000”
jam = “16.00”
Case Is = “EKO”
jenis = “EKONOMI”
harga = “35000”
jam = “19.00”
Case Is = “MUT”
jenis = “MUTIARA”
harga = “23000”
jam = “17.00”
Case Is = “SEN”
jenis = “SENJA”
harga = “15000”
jam = “20.00”
End Select
TXTJK.Text = jenis
TXTHT.Text = harga
TXTJB.Text = jam
TXTJT.SetFocus
End Sub

Private Sub TXTJT_KeyPress(KeyAscii As Integer)
If KeyAsci = 13 Then
TXTTOTALP.SetFocus
End If
TXTTOTALP.Text = Val(TXTHT.Text) * Val(TXTJT.Text)
End Sub

MENULIS NAMA

Untitled
Private Sub Check1_Click()
Label2.FontBold = CHECK1VALUE
End Sub

Private Sub Check2_Click()
Label2.FontItalic = CHECK2VALUE
End Sub

Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed
End Sub