Tugas 14

14

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnik.Text = “”

Txtgol.Text = “”

Txtkode.Text = “”

Txtstatus.Text = “”

Txttahun.Text = “”

Txtjabatan.Text = “”

Txtbagian.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txttotal.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnik.Text = “”

Txtgol.Text = “”

Txtkode.Text = “”

Txtstatus.Text = “”

Txttahun.Text = “”

Txtjabatan.Text = “”

Txtbagian.Text = “”

Txtgapok.Text = “”

Txttunjangan.Text = “”

Txttotal.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttahun.Text = Left(Txtnik, 4)

S = Mid(Txtnik, 5, 1)

If S = “A” Then

Txtgol.Text = “A”

Txtjabatan.Text = “Manager”

Txtgapok.Text = “4000000”

Txttunjangan = “1025000”

ElseIf S = “B” Then

Txtgol.Text = “B”

Txtjabatan.Text = “Ka. Seksi”

Txtgapok.Text = “3500000”

Txttunjangan = “975000”

ElseIf S = “C” Then

Txtgol.Text = “C”

Txtjabatan.Text = “Staff”

Txtgapok.Text = “3000000”

Txttunjangan = “925000”

End If

S = Right(Txtnik, 3)

If S = “KEU” Then

Txtbagian.Text = “Accounting”

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

S = Mid(Txtnik, 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

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

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnik.SetFocus

End If

End Sub

Iklan

Tugas 13

13

Private Sub Cmdbatal_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtjb.Text = “”

Txtpeng.Text = “”

Txttt.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtjb.Text = “”

Txtpeng.Text = “”

Txttt.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttt.Text = “20” & Right(Txtkode, 2)

S = Mid(Txtkode, 3, 3)

If S = “SIM” Then

Txtjb.Text = “Sistem Informasi Manajemen”

Txtpeng.Text = “Andra Setiawan”

Txtharga.Text = “75900”

ElseIf S = “EDP” Then

Txtjb.Text = “Elektronik Data Processing”

Txtpeng.Text = “Desi Istiqomah”

Txtharga.Text = “62000”

ElseIf S = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtpeng.Text = “Sandy Fitra jaya”

Txtharga.Text = “42000”

ElseIf S = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtpeng.Text = “Tri Indah Sari”

Txtharga.Text = “53000”

ElseIf S = “RPL” Then

Txtjb.Text = “Rekayasa Perangkat Lunak”

Txtpeng.Text = “Ernita Sari”

Txtharga.Text = “83000”

End If

S = Left(Txtkode, 1)

If S = “A” Then

Txtpenerbit.Text = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

Txtpenerbit.Text = “Indah Surabaya”

ElseIf S = “S” Then

Txtpenerbit.Text = “Salemba Empat”

ElseIf S = “E” Then

Txtpenerbit.Text = “Elek Media Komputindo”

ElseIf S = “M” Then

Txtpenerbit.Text = “Maxicom”

End If

End Sub

Tugas 12

12

Private Sub Cbokode_Click()

Dim merk, HS As String

Select Case Cbokode.Text

Case “Asus A43SA”

merk = “Asus A43SA-VX090D”

HS = “5500000”

Case “Asus A43SD”

merk = “Asus A43SD-VX052D”

HS = “4500000”

Case “Asus A43SJ”

merk = “Asus A43SJ-VX792D”

HS = “4300000”

Case “Asus A43TA”

merk = “Asus A43TA-VX034D”

HS = “4900000”

Case “Asus N43SL”

merk = “Asus N43SL-VX264D”

HS = “4300000”

Case “Apple MD311”

merk = “Apple MacBook Pro MD311”

HS = “19300000”

Case “Apple MD313”

merk = “Apple MacBook Pro MD313”

HS = “24200000”

Case “Apple MD314”

merk = “Apple MacBook Pro MD314”

HS = “11900000”

Case “Apple MD322”

merk = “Apple MacBook Pro MD322”

HS = “14700000”

Case “Apple MC965”

merk = “Apple MacBook Air MC965”

HS = “21300000”

End Select

Txtmerk.Text = merk

Txths.Text = HS

Txtjj.SetFocus

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtmerk.Text = “”

Txths.Text = “”

Txtjj.Text = “”

Txthp.Text = “”

Txtdiskon.Text = “”

Txttb.Text = “”

End Sub

Private Sub Cmdproses_Click()

Txthp.Text = Val(Txths) * Val(Txtjj)

Select Case Txthp.Text

Case Is > 140000000

Txtdiskon.Text = Val(Txthp) * 0.15

Case Is > 135000000

Txtdiskon.Text = Val(Txthp) * 0.1

Case Is > 130000000

Txtdiskon.Text = Val(Txthp) * 0.05

Case Is > 125000000

Txtdiskon.Text = Val(Txthp) * 0.02

End Select

Txttb.Text = Val(Txthp) – Val(Txtdiskon)

End Sub

Private Sub Form_Load()

Cbokode.AddItem “Asus A43SA”

Cbokode.AddItem “Asus A43SD”

Cbokode.AddItem “Asus A43SJ”

Cbokode.AddItem “Asus A43TA”

Cbokode.AddItem “Asus N43SL”

Cbokode.AddItem “Apple MD311”

Cbokode.AddItem “Apple MD313”

Cbokode.AddItem “Apple MD314”

Cbokode.AddItem “Apple MD322”

Cbokode.AddItem “Apple MC965”

End Sub

Tugas 11

11

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

Txtbp.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

Txtbp.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttm.Text = “20” & Left(Txtnpm.Text, 2)

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

Txtjur.Text = “Teknik Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Manajemen Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Manajemen & Komp. Akuntansi”

End If

S = Mid(Txtnpm.Text, 4, 2)

If S = “00” Then

Txtprodi.Text = “Strata Satu”

Txtbp.Text = “1950000”

ElseIf S = “01” Then

Txtprodi.Text = “Diploma Empat”

Txtbp.Text = “1750000”

ElseIf S = “02” Then

Txtprodi.Text = “Diploma Tiga”

Txtbp.Text = “1650000”

ElseIf S = “03” Then

Txtprodi.Text = “Diploma Dua”

Txtbp.Text = “1450000”

End If

Txtnu.Text = Right(Txtnpm.Text, 3)

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

Tugas 10

10.1

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtkelas.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

Txtup.Text = “”

Txtbps.Text = “”

Txtub.Text = “”

Txtbpa.Text = “”

Txttb.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtkelas.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

Txtup.Text = “”

Txtbps.Text = “”

Txtub.Text = “”

Txtbpa.Text = “”

Txttb.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

S = Left(Txtnpm, 1)

If S = “E” Then

Txtkelas.Text = “Eksekutif”

Txtub.Text = “1250000”

ElseIf S = “R” Then

Txtkelas.Text = “Reguler”

Txtub.Text = “1000000”

End If

S = Mid(Txtnpm, 6, 2)

If S = “00” Then

Txtprodi.Text = “Strata Satu”

If Txtkelas.Text = “Reguler” Then

Txtbps.Text = “1500000”

Else

Txtbps.Text = “1900000”

End If

ElseIf S = “01” Then

Txtprodi.Text = “Diploma Tiga”

If Txtkelas.Text = “Reguler” Then

Txtbps.Text = “1250000”

Else

Txtbps.Text = “1650000”

End If

ElseIf S = “02” Then

Txtprodi.Text = “Diploma Satu”

If Txtkelas.Text = “Reguler” Then

Txtbps.Text = “1250000”

Else

Txtbps.Text = “1350000”

End If

End If

S = Mid(Txtnpm, 5, 1)

If S = “1” Then

Txtjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

Txtjur.Text = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Manajemendan Komp. Akuntansi”

End If

Txttm.Text = “20” & Mid(Txtnpm.Text, 3, 2)

Txtnu.Text = Right(Txtnpm, 3)

If Txtprodi.Text = “Strata Satu” Then

Txtup.Text = “200000”

Txtbpa.Text = “600000”

Else

If Txtprodi.Text = “Diploma Tiga” Then

Txtup.Text = “150000”

Txtbpa.Text = “600000”

Else

If Txtprodi.Text = “Diploma Satu” Then

Txtup.Text = “150000”

Txtbpa.Text = “600000”

End If

End If

End If

Txttb.Text = Val(Txtup.Text) + Val(Txtbps.Text) + Val(Txtub.Text) + Val(Txtbpa.Text)

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

Tugas 9

9

Private Sub Cmdbatal_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtjb.Text = “”

Txtpeng.Text = “”

Txttt.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtjb.Text = “”

Txtpeng.Text = “”

Txttt.Text = “”

Txtpenerbit.Text = “”

Txtharga.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttt.Text = “20” & Mid(Txtkode, 5, 2)

S = Left(Txtkode, 3)

If S = “SIM” Then

Txtjb.Text = “Sistem Informasi Manajemen”

Txtpeng.Text = “Fadiya Ulfa”

Txtharga.Text = “75900”

ElseIf S = “EDP” Then

Txtjb.Text = “ElektronikData Processing”

Txtpeng.Text = “Nurul Agustina”

Txtharga.Text = “62000”

ElseIf S = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtpeng.Text = “Rian Hidayat”

Txtharga.Text = “42000”

ElseIf S = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtpeng.Text = “Siti Nur Khotimah”

Txtharga.Text = “53000”

ElseIf S = “RPL” Then

Txtjb.Text = “Rekayasa Perangkat Lunak”

Txtpeng.Text = “Winda Erlianti”

Txtharga.Text = “83000”

End If

S = Right(Txtkode, 1)

If S = “A” Then

Txtpenerbit.Text = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

Txtpenerbit.Text = “Indah Surabaya”

ElseIf S = “S” Then

Txtpenerbit.Text = “Salemba Empat”

ElseIf S = “E” Then

Txtpenerbit.Text = “Elek Media Komputindo”

ElseIf S = “M” Then

Txtpenerbit.Text = “Maxicom”

End If

End Sub

Tugas 8

8

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

Txtkode.SetFocus

Txtkode.Text = “”

Txtharga.Text = “”

Txtjenis.Text = “”

Txtjam.Text = “”

Txtjumlah.Text = “”

Txttotal.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

S = Left(Txtkode.Text, 3)

If S = “BIM” Then

Txtjenis.Text = “BIMA”

Txtharga.Text = “50000”

Txtjam.Text = “16.00”

ElseIf S = “EKO” Then

Txtjenis.Text = “EKONOMI”

Txtharga.Text = “35000”

Txtjam.Text = “19.00”

ElseIf S = “MUT” Then

Txtjenis.Text = “MUTIARA”

Txtharga.Text = “23000”

Txtjam.Text = “17.00”

ElseIf S = “SEN” Then

Txtjenis.Text = “SENJA”

Txtharga.Text = “15000”

Txtjam.Text = “20.00”

End If

Txtjumlah.SetFocus

End Sub

Private Sub Txtjumlah_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txttotal.Text = Val(Txtharga.Text) * Val(Txtjumlah.Text)

End If

End Sub

Tugas 7

7

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub Cmdprosess_Click()

Dim jr, ps As String

Txttm.Text = “20” & Left(Txtnpm, 2)

s = Mid(Txtnpm, 3, 1)

If s = “1” Then

jr = “Sistem Informasi”

ps = “Strata Satu”

ElseIf s = “2” Then

jr = “Teknik Informatika”

ps = “Diploma Empat”

ElseIf s = “3” Then

jr = “Manajemen Informatika”

ps = “Diploma Tiga”

ElseIf s = “4” Then

jr = “Komputer Akutannsi”

ps = “Diploma Tiga”

End If

Txtjur.Text = jr

Txtprodi.Text = ps

Txtnu.Text = Right(Txtnpm, 3)

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

Private Sub Txtnpm_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim jr, ps As String

Txttm.Text = “20” & Left(Txtnpm, 2)

s = Mid(Txtnpm, 3, 1)

If s = “1” Then

jr = “Sistem Informasi”

ps = “Strata Satu”

ElseIf s = “2” Then

jr = “Teknik Informatika”

ps = “Diploma Empat”

ElseIf s = “3” Then

jr = “Manajemen Informatika”

ps = “Diploma Tiga”

ElseIf s = “4” Then

jr = “Komputer Akutannsi”

ps = “Diploma Tiga”

End If

Txtjur.Text = jr

Txtprodi.Text = ps

Txtnu.Text = Right(Txtnpm, 3)

End If

End Sub

Tugas 6

6

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub Cmdprosess_Click()

Dim jr, ps As String

Txttm.Text = “20” & Left(Txtnpm, 2)

s = Mid(Txtnpm, 3, 1)

If s = “1” Then

jr = “Sistem Informasi”

ps = “Strata Satu”

ElseIf s = “2” Then

jr = “Teknik Informatika”

ps = “Diploma Empat”

ElseIf s = “3” Then

jr = “Manajemen Informatika”

ps = “Diploma Tiga”

ElseIf s = “4” Then

jr = “Komputer Akutannsi”

ps = “Diploma Tiga”

End If

Txtjur.Text = jr

Txtprodi.Text = ps

Txtnu.Text = Right(Txtnpm, 3)

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

Tugas 5

5

Private Sub cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

Txtnu.Text = “”

End Sub

Private Sub Cmdprosess_Click()

Dim jr, ps As String

Txttm.Text = “20” & Left(Txtnpm, 2)

s = Mid(Txtnpm, 3, 1)

If s = “1” Then

jr = “Sistem Informasi”

ElseIf s = “2” Then

jr = “Teknik Informatika”

ElseIf s = “3” Then

jr = “Manajemen Informatika”

ElseIf s = “4” Then

jr = “Komputer Akutannsi”

End If

Txtjur.Text = jr

s = Mid(Txtnpm, 4, 2)

If s = “01” Then

ps = “Strata Satu”

ElseIf s = “02” Then

ps = “Diploma Empat”

ElseIf s = “03” Then

ps = “Diploma Tiga”

ElseIf s = “04” Then

ps = “Diploma Dua”

End If

Txtprodi.Text = ps

Txtnu.Text = Right(Txtnpm, 3)

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnpm.SetFocus

End If

End Sub

Private Sub Txtnpm_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim jr, ps As String

Txttm.Text = “20” & Left(Txtnpm, 2)

s = Mid(Txtnpm, 3, 1)

If s = “1” Then

jr = “Sistem Informasi”

ElseIf s = “2” Then

jr = “Teknik Informatika”

ElseIf s = “3” Then

jr = “Manajemen Informatika”

ElseIf s = “4” Then

jr = “Komputer Akutannsi”

End If

Txtjur.Text = jr

s = Mid(Txtnpm, 4, 2)

If s = “01” Then

ps = “Strata Satu”

ElseIf s = “02” Then

ps = “Diploma Empat”

ElseIf s = “03” Then

ps = “Diploma Tiga”

ElseIf s = “04” Then

ps = “Diploma Dua”

End If

Txtprodi.Text = ps

Txtnu.Text = Right(Txtnpm, 3)

End If

End Sub