TUGAS 5

RIO 1RIO 2RIO 3rio 4rio 5

 

1)

Private Sub cmd_batal_Click()

txt_nama.SetFocus

txt_nama.Text = “”

txt_npm.Text = “”

txt_kelas.Text = “”

txt_jurusan.Text = “”

txt_program.Text = “”

txt_tahun.Text = “”

txt_urut.Text = “”

txt_pendaftaran.Text = “”

txt_pendidikan.Text = “”

txtbangunan.Text = “”

txt_almamater.Text = “”

txt_total.Text = “”

End Sub

 

Private Sub cmd_keluar_Click()

End

End Sub

 

 

Private Sub cmd_lagi_Click()

txt_nama.SetFocus

txt_nama.Text = “”

txt_npm.Text = “”

txt_kelas.Text = “”

txt_jurusan.Text = “”

txt_program.Text = “”

txt_tahun.Text = “”

txt_urut.Text = “”

txt_pendaftaran.Text = “”

txt_pendidikan.Text = “”

txtbangunan.Text = “”

txt_almamater.Text = “”

txt_total.Text = “”

End Sub

 

Private Sub cmd_proses_Click()

Dim x As String

x = Left(txt_npm.Text, 1)

If x = “E” Then

txt_kelas.Text = “Eksekutif”

txt_almamater.Text = “600000”

txtbangunan.Text = “1250000”

txt_almamater.Text = “600000”

ElseIf x = “R” Then

txt_kelas.Text = “Reguler”

txt_almamater.Text = “600000”

txtbangunan.Text = “1000000”

txt_almamater.Text = “600000”

End If

 

txt_tahun.Text = “20” & Mid(txt_npm.Text, 3, 2)

txt_urut.Text = Right(txt_npm.Text, 3)

 

x = Mid(txt_npm.Text, 5, 1)

If x = “1” Then

txt_jurusan.Text = “Sistem Informasi”

ElseIf x = “2” Then

txt_jurusan.Text = “Managemen Informatika”

ElseIf x = “3” Then

txt_jurusan.Text = “Managemen dan Komp. Akuntansi”

End If

x = Mid(txt_npm.Text, 6, 2)

If x = “01” Then

txt_program.Text = “Strata Satu”

txt_pendaftaran.Text = “200000”

ElseIf x = “02” Then

txt_program.Text = “Diploma Tiga”

txt_pendaftaran.Text = “150000”

ElseIf x = “03” Then

txt_program.Text = “Diploma Satu”

txt_pendaftaran.Text = “150000”

End If

x = Left(txt_npm.Text, 1) & Mid(txt_npm.Text, 6, 2)

If x = “E” & “01” Then

txt_pendidikan.Text = “1900000”

ElseIf x = “E” & “02” Then

txt_pendidikan.Text = “1650000”

ElseIf x = “E” & “03” Then

txt_pendidikan.Text = “1350000”

ElseIf x = “R” & “01” Then

txt_pendidikan.Text = “1500000”

ElseIf x = “R” & “02” Then

txt_pendidikan.Text = “1250000”

ElseIf x = “R” & “03” Then

txt_pendidikan.Text = “1250000”

End If

txt_total.Text = Val(txt_pendaftaran.Text) + Val(txt_pendidikan.Text) + Val(txtbangunan.Text) + Val(txt_almamater.Text)

 

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub txt_almamater_keypress(keyascii As Integer)

If keyascii = 13 Then

txt_nama.SetFocus

txt_total.Text = Val(txt_pendaftaran.Text) + Val(txt_pendidikan.Text) + Val(txtbangunan.Text) + Val(txt_almamater.Text)

End If

End Sub

2)

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtpstudi.Text = “”

Txttahun.Text = “”

Txtnurut.Text = “”

Txtbp.Text = “”

Txtterbilang.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

End

End Sub

 

Private Sub Cmdlagi_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjurusan.Text = “”

Txtpstudi.Text = “”

Txttahun.Text = “”

Txtnurut.Text = “”

Txtbp.Text = “”

Txtterbilang.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim x As String

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

 

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

If x = “1” Then

Txtjurusan.Text = “Sistem Informasi”

 

ElseIf x = “2” Then

Txtjurusan.Text = “Tehnik Informasi”

 

ElseIf x = “3” Then

Txtjurusan.Text = “Manajemen Informatika”

 

ElseIf x = “4” Then

Txtjurusan.Text = “Manajemen & Komp. Akuntansi”

 

End If

 

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

 

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

If x = “01” Then

Txtpstudi.Text = “Strata Satu”

Txtbp.Text = “1950000”

 

ElseIf x = “02” Then

Txtpstudi.Text = “Diploma Empat”

Txtbp.Text = “1750000”

 

ElseIf x = “03” Then

Txtpstudi.Text = “Diploma Tiga”

Txtbp.Text = “1650000”

 

ElseIf x = “04” Then

Txtpstudi.Text = “Diploma Dua”

Txtbp.Text = “1450000”

 

End If

Txtterbilang.Text = Terbilang(Txtbp.Text)

 

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub Txtbp_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtterbilang.Text = Terbilang(Txtbp.Text)

End If

End Sub

 

Function Terbilang(Angka As String) As String

Dim n1 As String

Dim nangka, Strjmlhuruf$, intpecahan As Integer, strpecahan$, urai$, Bil1$, strtot$, bil2$

Dim x, Y, z, i As Integer

 

For i = 1 To Len(Angka)

If Not Mid(Angka, i, 1) = “.” Then

nangka = nangka + Mid(Angka, i, 1)

End If

Next

 

If Len(LTrim(nangka)) = 0 Then

terbit = “Nol Rupiah”

Exit Function

End If

Strjmlhuruf = LTrim(RTrim((nangka)))

intpecahan = Val(Right(Mid(Angka, 15, 2), 2))

If (intpecahan = 0) Then

strpecahan = “”

End If

x = 0

Y = 0

urai = “”

 

While (x < Len(Strjmlhuruf))

x = x + 1

strtot = Mid(Strjmlhuruf, x, 1)

Y = Y + Val(strtot)

z = Len(Strjmlhuruf) – x + 1

 

Select Case Val(strtot)

Case 1

If (z = 1 Or z = 7 Or z = 10 Or z = 13) Then

Bil1 = “Satu ”

ElseIf (z = 4) Then

If (x = 1) Then

Bil1 = “Se”

Else

Bil1 = “Satu ”

End If

ElseIf (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 14) Then

x = x + 1

strtot = Mid(Strjmlhuruf, x, 1)

z = Len(Strjmlhuruf) – x + 1

bil2 = “”

 

Select Case Val(strtot)

Case 0

Bil1 = “Sepuluh ”

Case 1

Bil1 = “Sebelas ”

Case 2

Bil1 = “Dua Belas ”

Case 3

Bil1 = “Tiga Belas ”

Case 4

Bil1 = “Empat Belas ”

Case 5

Bil1 = “Lima Belas ”

Case 6

Bil1 = “Enam Belas ”

Case 7

Bil1 = “Tujuh Belas ”

Case 8

Bil1 = “Delapan Belas ”

Case 9

Bil1 = “Sembilan Belas ”

End Select

Else

Bil1 = “Se”

End If

 

Case 2

Bil1 = “Dua ”

Case 3

Bil1 = “Tiga ”

Case 4

Bil1 = “Empat ”

Case 5

Bil1 = “Lima ”

Case 6

Bil1 = “Enam ”

Case 7

Bil1 = “Tujuh ”

Case 8

Bil1 = “Delapan ”

Case 9

Bil1 = “Sembilan ”

Case Else

Bil1 = “”

End Select

 

If (Val(strtot) > 0) Then

If (z = 2 Or z = 5 Or z = 8 Or z = 11 Or z = 14) Then

bil2 = “Puluh ”

ElseIf (z = 3 Or z = 6 Or z = 9 Or z = 12 Or z = 15) Then

bil2 = “Ratus ”

Else

bil2 = “”

End If

Else

bil2 = “”

End If

If (Y > 0) Then

Select Case z

Case 4

bil2 = bil2 + “Ribu ”

Y = 0

Case 7

bil2 = bil2 + “Juta ”

Y = 0

Case 10

bil2 = bil2 + “Milyar ”

Y = 0

Case 13

bil2 = bil2 + “Trilyun ”

Y = 0

End Select

End If

urai = urai + Bil1 + bil2

Wend

 

urai = urai + strpecahan

Terbilang = urai & “Rupiah ”

Terbilang = LCase(Terbilang)

n1 = UCase(Left(Terbilang, 1))

Terbilang = n1 & Mid(Terbilang, 2, Len(Terbilang) – 1)

End Function

3)

 

Private Sub Form_Load()

Cbo_Kode.AddItem “Asus A43SA”

Cbo_Kode.AddItem “Asus A43SD”

Cbo_Kode.AddItem “Asus A43SJ”

Cbo_Kode.AddItem “Asus A43TA”

Cbo_Kode.AddItem “Asus N43SL”

Cbo_Kode.AddItem “Apple MD311”

Cbo_Kode.AddItem “Apple MD313”

Cbo_Kode.AddItem “Apple MD313”

Cbo_Kode.AddItem “Apple MD322”

Cbo_Kode.AddItem “Apple MC965”

End Sub

 

Private Sub Cbo_Kode_Click()

Dim Merk, Satuan As String

Select Case Cbo_Kode.Text

Case “Asus A43SA”

Merk = “Asus A43SA-VX090D”

Satuan = “5500000”

 

Case “Asus A43SD”

Merk = “Asus A43SD-VX052D”

Satuan = “4500000”

 

Case “Asus A43SJ”

Merk = “Asus A43SJ-VX792D”

Satuan = “4300000”

 

Case “Asus A43TA”

Merk = “Asus A43TA-VX034D”

Satuan = “4900000”

 

Case “Asus N43SL”

Merk = “Asus N43SL-VX264D”

Satuan = “4300000”

 

Case “Apple MD311”

Merk = “Apple MacBook Pro MD311”

Satuan = “19300000”

 

Case “Apple MD313”

Merk = “Apple MacBook Pro MD313”

Satuan = “24200000”

 

Case “Apple MD314”

Merk = “Apple MacBook Pro MD314”

Satuan = “11900000”

 

Case “Apple MD322”

Merk = “Apple MacBook Pro MD322”

Satuan = “14700000”

 

Case “Apple MC965”

Merk = “Apple MacBook Air MC965”

Satuan = “21300000”

End Select

 

Txt_Merk.Text = Merk

Txt_HS.Text = Satuan

Txt_JJ.SetFocus

End Sub

 

Private Sub Txt_JJ_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_HP.SetFocus

Txt_HP.Text = Val(Txt_HS.Text) * Val(Txt_JJ.Text)

End If

 

Select Case Txt_HP.Text

Case Is > 140000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.15

 

Case Is > 135000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.1

 

Case Is > 130000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.5

 

Case Is > 125000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.2

End Select

 

Txt_TB.Text = Val(Txt_HP.Text) – Val(Txt_Dc.Text)

End Sub

 

Private Sub Cmd_Proses_Click()

Txt_HP.Text = Val(Txt_HS.Text) * Val(Txt_JJ.Text)

Select Case Txt_HP.Text

Case Is > 140000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.15

 

Case Is > 135000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.1

 

Case Is > 130000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.5

 

Case Is > 125000000

Txt_Dc.Text = Val(Txt_HP.Text) * 0.2

End Select

 

Txt_TB.Text = Val(Txt_HP.Text) – Val(Txt_Dc.Text)

End Sub

 

 

Private Sub Cmd_Ulang_Click()

Cbo_Kode.SetFocus

Txt_Merk = “”

Txt_HS = “”

Txt_JJ = “”

Txt_HP = “”

Txt_Dc = “”

Txt_TB = “”

End Sub

 

Private Sub Cmd_Exit_Click()

End

End Sub

4)

Private Sub Cmdkeluar_Click()

End

End Sub

 

 

 

Private Sub Cmdbatal_Click()

Txtkb.SetFocus

Txtkb.Text = “”

Txtjb.Text = “”

Txtp.Text = “”

Txttahun.Text = “”

Txtpenerbit.Text = “”

Txthg.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim s As String

Txttahun.Text = “20” & Mid(Txtkb.Text, 7, 2)

s = Mid(Txtkb.Text, 3, 3)

If s = “SIM” Then

Txtjb.Text = “Sistem Informasi Managemen”

Txtp.Text = “Andra Setiawan”

Txthg.Text = “75900”

ElseIf s = “EDP” Then

Txtjb.Text = “elektronik data Procesing”

Txtp.Text = “Desi Istiqomah”

Txthg.Text = “62000”

ElseIf s = “MNJ” Then

Txtjb.Text = “Manajemen”

Txtp.Text = “Sandy Fitrijaya”

Txthg.Text = “42000”

ElseIf s = “CDR” Then

Txtjb.Text = “Corel Draw”

Txtp.Text = “Tri Indah Sari”

Txthg.Text = “53000”

ElseIf s = “RPL” Then

Txtjb.Text = “Rekaya Perangkat Lunak ”

Txtp.Text = “Ernita Sari”

Txthg.Text = “83000”

 

 

End If

s = Mid(Txtkb.Text, 1, 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

 

 

Private Sub Cmdlg_Click()

Txtkb.SetFocus

Txtkb.Text = “”

Txtjb.Text = “”

Txtp.Text = “”

Txttahun.Text = “”

Txtpenerbit.Text = “”

Txthg.Text = “”

End Sub

 

Private Sub Label10_Click()

 

End Sub

5)

Private Sub Cmd_Batal_Click()

Txt_Nama.SetFocus

Txt_NIK.Text = “”

Txt_Golongan.Text = “”

Txt_Kode.Text = “”

Txt_Status.Text = “”

Txt_Tahun.Text = “”

Txt_Jabatan.Text = “”

Txt_Bagian.Text = “”

Txt_Gaji.Text = “”

Txt_Tunjangan.Text = “”

Txt_Total.Text = “”

End Sub

 

Private Sub Cmd_Keluar_Click()

End

End Sub

 

Private Sub Cmd_Lagi_Click()

Txt_Nama.SetFocus

Txt_NIK.Text = “”

Txt_Golongan.Text = “”

Txt_Kode.Text = “”

Txt_Status.Text = “”

Txt_Tahun.Text = “”

Txt_Jabatan.Text = “”

Txt_Bagian.Text = “”

Txt_Gaji.Text = “”

Txt_Tunjangan.Text = “”

Txt_Total.Text = “”

End Sub

 

Private Sub Cmd_Proses_Click()

Dim x As String

Txt_Golongan.Text = Mid(Txt_NIK.Text, 5, 1)

Txt_Kode.Text = Mid(Txt_NIK.Text, 7, 1)

Txt_Tahun.Text = Left(Txt_NIK.Text, 4)

 

x = Mid(Txt_NIK.Text, 7, 1)

If x = “S” Then

Txt_Status.Text = “Single”

 

ElseIf x = “M” Then

Txt_Status.Text = “Menikah”

 

ElseIf x = “J” Then

Txt_Status.Text = “Janda”

 

ElseIf x = “D” Then

Txt_Status.Text = “Duda”

 

End If

 

x = Mid(Txt_NIK.Text, 5, 1)

If x = “A” Then

Txt_Jabatan.Text = “Manager”

Txt_Gaji.Text = “4000000”

Txt_Tunjangan.Text = “1025000”

 

ElseIf x = “B” Then

Txt_Jabatan.Text = “Ka. Seksi”

Txt_Gaji.Text = “3500000”

Txt_Tunjangan.Text = “975000”

 

ElseIf x = “C” Then

Txt_Jabatan.Text = “Staff”

Txt_Gaji.Text = “3000000”

Txt_Tunjangan.Text = “925000”

 

End If

 

x = Right(Txt_NIK.Text, 3)

If x = “KEU” Then

Txt_Bagian.Text = “Accounting”

 

ElseIf x = “ADM” Then

Txt_Bagian.Text = “Administrasi”

 

ElseIf x = “SDM” Then

Txt_Bagian.Text = “General Affair”

 

ElseIf x = “EDP” Then

Txt_Bagian.Text = “IT Unit”

 

ElseIf x = “SPM” Then

Txt_Bagian.Text = “Security”

End If

 

Txt_Total.Text = Val(Txt_Gaji.Text) + Val(Txt_Tunjangan.Text)

End Sub

 

Private Sub Form_Load()

 

End Sub

Iklan

tugas 4

r1-2r-3r4-5r-6r-7r08r-9

Nama    :ryo andreal

Npm      :14100092

Kelas     :website 3

No 1 dan 2

 

Private Sub Cbonpm_Click()

Dim nama, jurusan As String

Select Case cbonpm.Text

Case “09100027”

nama = “AFNAN ZALFA SALSABILA A”

jurusan = “Sistem Informasi”

Case “09200048”

nama = “AMALIA AMANAH”

jurusan = “Manajemen Informatika”

Case “09300024”

nama = “SASKIA MECHA”

jurusan = “Tehnik Informatika”

End Select

txtnama.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

 

Private Sub Form_Load()

cbonpm.AddItem “09100027”

cbonpm.AddItem “09200048”

cbonpm.AddItem “09300024”

End Sub

 

Private Sub Label1_Click()

 

End Sub

 

Private Sub txtquis_KeyPress(keyascii As Integer)

If keyascii = 13 Then

txttugas.SetFocus

End If

End Sub

 

Private Sub txttugas_KeyPress(keyascii As Integer)

If keyascii = 13 Then

txtuts.SetFocus

End If

End Sub

Private Sub txtuts_KeyPress(keyascii As Integer)

If keyascii = 13 Then

txtuas.SetFocus

End If

End Sub

 

 

Private Sub Cmdbatal_Click()

cbonpm.SetFocus

cbonpm.Text = “”

txtnama.Text = “”

txtjurusan.Text = “”

txtquis.Text = “”

txttugas.Text = “”

txtuts.Text = “”

txtuas.Text = “”

txtna.Text = “”

txthm.Text = “”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

Private Sub Cmdproses_Click()

Dim NA As Integer

Dim HM As String

QUIS = Val(txtquis.Text)

TUGAS = Val(txttugas.Text)

UTS = Val(txtuts.Text)

UAS = Val(txtuas.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

txtna.Text = NA

 

Select Case txtna.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

txthm.Text = HM

End Sub

Private Sub txtuas_keypress(keyascii As Integer)

If keyascii = 13 Then

Dim NA As Integer

Dim HM As String

QUIS = Val(txtquis.Text)

TUGAS = Val(txttugas.Text)

UTS = Val(txtuts.Text)

UAS = Val(txtuas.Text)

NA = (QUIS + TUGAS + UTS + UAS) / 4

txtna.Text = NA

 

Select Case txtna.Text

Case Is > 80

HM = “A”

Case Is > 70

HM = “B”

Case Is > 60

HM = “C”

Case Is > 50

HM = “D”

Case Is < 50

HM = “E”

End Select

txthm.Text = HM

End If

End Sub

NO 3

Private Sub Cmdbatal_Click()

kosong

End Sub

Private Sub cmdlagi_Click()

kosong

End Sub

 

Private Sub Form_load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

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

Public Sub kosong()

txtnidn.SetFocus

txtnidn.Text = “”

txtnama.Text = “”

cbogolongan.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txtpajak.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub txtnind_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnama.SetFocus

End If

End Sub

NO 4.5

Private Sub Cmdbatal_Click()

kosong

End Sub

Private Sub cmdlagi_Click()

kosong

End Sub

 

Private Sub Form_load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

End Sub

 

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

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

Public Sub kosong()

txtnidn.SetFocus

txtnidn.Text = “”

txtnama.Text = “”

cbogolongan.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txtpajak.Text = “”

txttotal.Text = “”

End Sub

 

Private Sub txtnind_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnama.SetFocus

End If

End Sub

NO 6

 

Private Sub cmdlagi_Click()

txtkodebuku.SetFocus

txtkodebuku.Text = “”

txtjudulbuku.Text = “”

txtpengarang.Text = “”

txttahunterbit.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

 

Private Sub cmdbatal_Click()

txtkodebuku.SetFocus

txtkodebuku.Text = “”

txtjudulbuku.Text = “”

txtpengarang.Text = “”

txttahunterbit.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub cmdkeluar_click()

End

End Sub

 

 

Private Sub Cmdproses_Click()

Dim S As String

txttahunterbit.Text = “20” & Mid(txtkodebuku.Text, 5, 2)

S = Left(txtkodebuku.Text, 3)

If S = “SIM” Then

txtjudulbuku.Text = “Sistem Informasi”

txtpengarang.Text = “Fadiya ulfa”

ElseIf S = “EDP” Then

txtjudulbuku.Text = “elektronik data Procesing”

txtpengarang.Text = “Nurul Agustina”

ElseIf S = “MNJ” Then

txtjudulbuku.Text = “Manajemen”

txtpengarang.Text = “Riyan Hidayat”

ElseIf S = “CDR” Then

txtjudulbuku.Text = “Corel Draw”

txtpengarang.Text = “Siti Nurkhotimah”

ElseIf S = “RPL” Then

txtjudulbuku.Text = “Rekaya Perangkat Lunak ”

txtpengarang.Text = “Winda erlianti”

 

 

End If

S = Mid(txtkodebuku.Text, 8, 1)

If S = “A” Then

txtpenerbit.Text = “Andi offset yogyakarta”

txtharga.Text = “75900”

ElseIf S = “I” Then

txtpenerbit.Text = “Indah Surabaya”

txtharga.Text = “62000”

ElseIf S = “S” Then

txtpenerbit.Text = “Salemba Empat”

txtharga.Text = “42000”

ElseIf S = “E” Then

txtpenerbit.Text = “Elek Media Komputindo”

txtharga.Text = “53000”

ElseIf S = “M” Then

txtpenerbit.Text = “Maxicom”

txtharga.Text = “83000”

End If

 

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

 

End Sub

 

Private Sub Label1_Click()

 

End Sub

 

Private Sub Label3_Click()

 

End Sub

 

Private Sub Label4_Click()

 

End Sub

 

Private Sub Label6_Click()

 

End Sub

 

Private Sub txtharga_Change()

 

End Sub

 

Private Sub txtpenerbit_Change()

 

End Sub

 

Private Sub txtpengarang_Change()

 

End Sub

 

Private Sub txttahunterbit_Change()

 

End Sub

NO 7

Private Sub cmdlagi_Click()

txtkodebuku.SetFocus

txtkodebuku.Text = “”

txtjudulbuku.Text = “”

txtpengarang.Text = “”

txttahunterbit.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

 

Private Sub cmdbatal_Click()

txtkodebuku.SetFocus

txtkodebuku.Text = “”

txtjudulbuku.Text = “”

txtpengarang.Text = “”

txttahunterbit.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub cmdkeluar_click()

End

End Sub

 

 

Private Sub Cmdproses_Click()

Dim S As String

txttahunterbit.Text = “20” & Mid(txtkodebuku.Text, 5, 2)

S = Left(txtkodebuku.Text, 3)

If S = “SIM” Then

txtjudulbuku.Text = “Sistem Informasi”

txtpengarang.Text = “Fadiya ulfa”

ElseIf S = “EDP” Then

txtjudulbuku.Text = “elektronik data Procesing”

txtpengarang.Text = “Nurul Agustina”

ElseIf S = “MNJ” Then

txtjudulbuku.Text = “Manajemen”

txtpengarang.Text = “Riyan Hidayat”

ElseIf S = “CDR” Then

txtjudulbuku.Text = “Corel Draw”

txtpengarang.Text = “Siti Nurkhotimah”

ElseIf S = “RPL” Then

txtjudulbuku.Text = “Rekaya Perangkat Lunak ”

txtpengarang.Text = “Winda erlianti”

 

 

End If

S = Mid(txtkodebuku.Text, 8, 1)

If S = “A” Then

txtpenerbit.Text = “Andi offset yogyakarta”

txtharga.Text = “75900”

ElseIf S = “I” Then

txtpenerbit.Text = “Indah Surabaya”

txtharga.Text = “62000”

ElseIf S = “S” Then

txtpenerbit.Text = “Salemba Empat”

txtharga.Text = “42000”

ElseIf S = “E” Then

txtpenerbit.Text = “Elek Media Komputindo”

txtharga.Text = “53000”

ElseIf S = “M” Then

txtpenerbit.Text = “Maxicom”

txtharga.Text = “83000”

End If

 

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

 

End Sub

 

Private Sub Label1_Click()

 

End Sub

 

Private Sub Label3_Click()

 

End Sub

 

Private Sub Label4_Click()

 

End Sub

 

Private Sub Label6_Click()

 

End Sub

 

Private Sub txtharga_Change()

 

End Sub

 

Private Sub txtpenerbit_Change()

 

End Sub

 

Private Sub txtpengarang_Change()

 

End Sub

 

Private Sub txttahunterbit_Change()

 

End Sub

 

 

NO 8

Private Sub c_Click()

End

End Sub

 

Private Sub ds_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

hb.SetFocus

End If

End Sub

 

Private Sub Form_Load()

kk.AddItem “P205”

kk.AddItem “P308”

kk.AddItem “P310”

kk.AddItem “P415”

kk.AddItem “P417”

kk.AddItem “P419”

End Sub

 

Private Sub hb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

ps.SetFocus

End If

End Sub

 

Private Sub hp_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

ds.SetFocus

End If

End Sub

 

Private Sub hs_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

jj.SetFocus

End If

End Sub

 

Private Sub ht_Click()

kk.SetFocus

kk.Text = “”

jk.Text = “”

hs.Text = “”

jj.Text = “”

hp.Text = “”

ds.Text = “”

hb.Text = “”

End Sub

 

Private Sub jj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

hp.Text = Val(hs.Text) * (jj.Text)

End If

hp.Text = hp

Select Case hp.Text

Case Is > 30000000

ds.Text = Val(hp.Text) * 0.15

Case Is > 25000000

ds.Text = Val(hp.Text) * 0.1

Case Is > 20000000

ds.Text = Val(hp.Text) * 0.5

Case Is > 15000000

ds.Text = Val(hp.Text) * 0.2

End Select

hb.Text = Val(hp.Text) – Val(ds.Text)

 

End Sub

 

Private Sub jk_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

hs.SetFocus

End If

End Sub

 

Private Sub kk_Click()

If kk.Text = “P205” Then

jk.Text = “Pentium II 500 Mega Hz”

hs.Text = “1500000”

ElseIf kk.Text = “P308” Then

jk.Text = “Pentium III 800 Mega Hz”

hs.Text = “2100000”

ElseIf kk.Text = “P310” Then

jk.Text = “Pentium III 1.0 Giga Hz”

hs.Text = “3500000”

ElseIf kk.Text = “P415” Then

jk.Text = “Pentium IV 1.5 Giga Hz”

hs.Text = “4000000”

ElseIf kk.Text = “P417” Then

jk.Text = “Pentium Iv 1.7 Giga Hz”

hs.Text = “4200000”

ElseIf kk.Text = “P419” Then

jk.Text = “Pentium IV 1.9 Giga Hz”

hs.Text = “5500000”

End If

End Sub

 

Private Sub kk_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

jk.SetFocus

End If

End Sub

 

Private Sub ps_Click()

hp.Text = Val(hs.Text) * (jj.Text)

hp.Text = hp

Select Case hp.Text

Case Is > 30000000

ds.Text = Val(hp.Text) * 0.15

Case Is > 25000000

ds.Text = Val(hp.Text) * 0.1

Case Is > 20000000

ds.Text = Val(hp.Text) * 0.5

Case Is > 15000000

ds.Text = Val(hp.Text) * 0.2

End Select

hb.Text = Val(hp.Text) – Val(ds.Text)

End Sub

NO 9

Private Sub ds_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

tb.SetFocus

End If

End Sub

 

Private Sub Form_Load()

kp.AddItem “Apple MC965 Macbook Air”

kp.AddItem “Apple MC966 Macbook Air”

kp.AddItem “Apple MC968 Macbook Air”

kp.AddItem “Apple MC969 Macbook Air”

kp.AddItem “Apple MC700 Macbook Pro”

kp.AddItem “Apple MC721 Macbook Pro”

kp.AddItem “Apple MC723 Macbook Pro”

kp.AddItem “Apple MC311 Macbook Pro”

kp.AddItem “Apple MC313 Macbook Pro”

kp.AddItem “Apple MC314 Macbook Pro”

kp.AddItem “Apple MC318 Macbook Pro”

kp.AddItem “Apple MC322 Macbook Pro”

kp.AddItem “Apple MC965 Macbook Air”

kp.AddItem “Apple MC966 Macbook Air”

 

End Sub

Private Sub hp_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

ds.SetFocus

End If

End Sub

 

Private Sub hs_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

jj.SetFocus

End If

End Sub

 

Private Sub ht_Click()

kp.SetFocus

kp.Text = “”

mt.Text = “”

hs.Text = “”

jj.Text = “”

hp.Text = “”

ds.Text = “”

tb.Text = “”

End Sub

 

Private Sub jj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

hp.SetFocus

hp.Text = Val(hs.Text) * Val(jj.Text)

End If

Select Case hp.Text

Case Is > 140000000

ds.Text = Val(hp.Text) * 0.15

Case Is > 135000000

ds.Text = Val(hp.Text) * 0.1

Case Is > 130000000

ds.Text = Val(hp.Text) * 0.5

Case Is > 125000000

ds.Text = Val(hp.Text) * 0.2

End Select

tb.Text = Val(hp.Text) – Val(ds.Text)

End Sub

 

Private Sub kl_Click()

End

End Sub

 

Private Sub kp_Click()

If kp.Text = “Apple MC965 Macbook Air” Then

mt.Text = “Apple Macbook Air MC965”

hs.Text = “12800000”

ElseIf kp.Text = “Apple MC966 Macbook Air” Then

mt.Text = “Apple Macbook Air MC965”

hs.Text = “15800000”

ElseIf kp.Text = “Apple MC968 Macbook Air” Then

mt.Text = “Apple Macbook Air MC968”

hs.Text = “9900000”

ElseIf kp.Text = “Apple MC969 Macbook Air” Then

mt.Text = “Apple Macbook Air MC969”

hs.Text = “11900000”

ElseIf kp.Text = “Apple MC700 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC700”

hs.Text = “10800000”

ElseIf kp.Text = “Apple MC721 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC721”

hs.Text = “15900000”

ElseIf kp.Text = “Apple MC723 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC723”

hs.Text = “19300000”

ElseIf kp.Text = “Apple MC311 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC311”

hs.Text = “24200000”

ElseIf kp.Text = “Apple MC313 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC313”

hs.Text = “11900000”

ElseIf kp.Text = “Apple MC314 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC314”

hs.Text = “14700000”

ElseIf kp.Text = “Apple MC318 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC318”

hs.Text = “17600000”

ElseIf kp.Text = “Apple MC322 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC322”

hs.Text = “21300000”

ElseIf kp.Text = “Apple MC965 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC965”

hs.Text = “12800000”

ElseIf kp.Text = “Apple MC966 Macbook Pro” Then

mt.Text = “Apple Macbook Pro MC966”

hs.Text = “15800000”

End If

End Sub

 

 

 

Private Sub kp_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

mt.SetFocus

End If

End Sub

Private Sub mt_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

hs.SetFocus

End If

End Sub

 

Private Sub ps_Click()

hp.Text = Val(hs.Text) * Val(jj.Text)

Select Case hp.Text

Case Is > 140000000

ds.Text = Val(hp.Text) * 0.15

Case Is > 135000000

ds.Text = Val(hp.Text) * 0.1

Case Is > 130000000

ds.Text = Val(hp.Text) * 0.5

Case Is > 125000000

ds.Text = Val(hp.Text) * 0.2

End Select

tb.Text = Val(hp.Text) – Val(ds.Text)

End Sub

 

tugas 3

RYO 3RYO 2RYO 1

 

Private Sub Command1_Click()

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End Sub

 

Private Sub Command2_Click()

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text1.SetFocus

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Form_Load()

 

End Sub

 

Private Sub Text1_keypress(keyascii As Integer)

If keyascii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text2_keypress(keyascii As Integer)

If keyascii = 13 Then

Text3.SetFocus

End If

End Sub

 

Private Sub Text3_keypress(keyascii As Integer)

If keyascii = 13 Then

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End If

End Sub

 

Private Sub Text5_Change()

 

End Sub

 

Private Sub chkbold_Click()

If chkbold.Value = 1 Then

lbltext.FontBold = True

Else

lbltext.FontBold = False

End If

 

End Sub

 

Private Sub Chkitalic_Click()

If chkitalic.Value = 1 Then

lbltext.FontItalic = True

Else

lbltext.FontItalic = False

End If

End Sub

 

Private Sub Chkstrike_Click()

If chkstrike.Value = 1 Then

lbltext.FontStrikethru = True

Else

lbltext.FontStrikethru = False

End If

End Sub

 

 

 

Private Sub Chkunder_Click()

If chkunder.Value = 1 Then

lbltext.FontUnderline = True

Else

lbltext.FontUnderline = False

End If

End Sub

 

Private Sub Cmdexit_Click()

End

End Sub

 

 

 

Private Sub optblue_Click()

lbltext.ForeColor = vbBlue

 

End Sub

 

Private Sub optgreen_Click()

lbltext.ForeColor = vbGreen

 

End Sub

 

Private Sub optred_Click()

lbltext.ForeColor = vbRed

 

End Sub

 

 

 

Private Sub optyellow_Click()

lbltext.ForeColor = vbYellow

End Sub

 

Private Sub chkbold_Click()

Label2.FontBold = chkbold.Value

End Sub

 

Private Sub chkitalic_Click()

Label2.FontItalic = chkitalic.Value

End Sub

 

Private Sub chkstrike_Click()

Label2.FontStrikethru = chkstrike.Value

End Sub

 

 

Private Sub chkunder_Click()

Label2.FontUnderline = chkunder.Value

End Sub

 

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdok_Click()

Label2.Caption = Text1.Text

End Sub

 

Private Sub optblue_Click()

Label2.ForeColor = vbBlue

End Sub

 

Private Sub optgreen_Click()

Label2.ForeColor = vbGreen

End Sub

 

Private Sub optred_Click()

Label2.ForeColor = vbRed

End Sub

 

Private Sub optyellow_Click()

Label2.ForeColor = vbYellow

End Sub

 

 

tugas 2

a0302

Private Sub Cmd_LG_Click()
Text_1.Text = “”
Text_2.Text = “”
Text_3.Text = “”
Text_4.Text = “”Private Sub Cmd_BL_Click()
Text_1.Text = “”
Text_2.Text = “”
Text_3.Text = “”
Text_4t.Text = “”
Text_5.Text = “”
End Sub

Private Sub Cmd_KM_Click()
End
End Sub
Text_5.Text = “”
End Sub

Private Sub Form_Load()

End Sub

Private Sub Text_1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text_2.Set Focus
End If
End Sub
Private Sub Text_2_KeyPress(KeyAscii As) Integer
If KeyAscii = 13 Then
Text_3.Set Focus
End If
End Sub
Private Sub Text_3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text_4.Set Focus
End If
End Sub
Private Sub Text_4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text_5.Set Focus
End If
End Sub

jab rumus no 2

Private Sub Cmd_km_Click(Index As Integer)
Text_dm.Text = “”
Text_km.Text = “”
Text_a.Text = “”
End Sub
Private Sub Cmd_dm_Click(Index As Integer)
Dim a, dm, k As Single
a = Txt_a
d = Txt_dm
k = R * dm
Txt_K.Text = k
End Sub
Private Sub Text_j_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim d, k, a As Single
d = Text_d
k = Text_K
a = k * a
Text_K.Text k = k
End If
End Sub
Private Sub text_a_KeyPress(KeyAscii As Integer)
End Sub
If KeyAscii = 13 Then
Text_b.SetFocus
End If
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)

End Sub

Private Sub Form_Load()

End Sub

Private Sub Txt_J_Change()

End Sub

jab rumus no 3

Private Sub Cmd_b_Click()
text_1.Text = “”
text_2.Text = “”
text_3.Text = “”
text_4.Text = “”
text_5.Text = “”
text_6.Text = “”
text_7.Text = “”
text_8.Text = “”
text_9.Text = “”
text_10.Text = “”
text_11.Text = “”
End Sub
Private Sub cmd_h_Click()
text_13.Text = Val(txt_1) + Val(txt_2)
text_21.Text = Val(txt_3) – Val(txt_4)
text_82.Text = Val(txt_5) * Val(txt_6)
text_98.Text = Val(txt_7) / Val(txt_8)
End Sub

Private Sub Cmd_k_Click()
text_1.Text = “”
text_2.Text = “”
text_12.Text = “”
text_3.Text = “”
text_4.Text = “”
text_24.Text = “”
text_5.Text = “”
text_6.Text = “”
text_86.Text = “”
text_7.Text = “”
text_8.Text = “”
text_78.Text = “”
End Sub

Private Sub Form_Load()

End Sub

Private Sub text_1keypress(keyascii As Integer)
If keyascii = 13 Then
text_2.setfokus
End If
End Sub

Private Sub txt_12_Change()

End Sub

Private Sub txt_2_keypress(keyascii As Integer)
text_12_.Text = Val(txt_1) * Val(txt_2)
End Sub

Private Sub text_12_Change()
End Sub

Private Sub txt_2_keyress(keyascii As Integer)
text_12.Text = Val(txt_1) + Val(txt_2)
End Sub

Private Sub txt_3_keypress(keyascii As Integer)
If keyascii = 13 Then
End If
End Sub

Private Sub text_5_keypress(keyascii As Integer)
If keyascii = 13 Then
text_6.setfokus
End If
End Sub

Private Sub text_56_Change()
End Sub

Private Sub text_7_keypress(keyascii As Integer)
If keyascii = 13 Then
Dim A, D, AD As Single
A = text_3
D = text_4
AD = A – D
text_34.Text = AD
End If
End Sub
Private Sub text_6_keypress(keyascii As Integer)
If keyascii = 13 Then
End Sub

Private Sub text_6_keypress(keyascii As Integer)
If keyascii = 13 Then
Dim m, i, mi As Single
m = text_5
i = text_6
mi = m * i
text_75.Text = mi
End If
End Sub

Private Sub text_8_keypress(keyascii As Integer)
If keyascii = 13 Then
End If
End Sub

Private Sub text_8_keypress(keyascii As Integer)
If keyascii = 13 Then
Dim m, i, mii As Single
m = text_7
i = text_8
mi = m – i
text_85.Text = Dy
End If
End Sub

Private Sub Label2_Click()

End Sub

Private Sub Label3_Click()

End Sub

website 3