no 1

 

Picture1

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 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

 

no 2

 

Picture2

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 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

 

 

 

no 3

Picture3

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

 

 

no 4

Picture4

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 Form_Load()

 

End Sub

 

no 5

Picture5

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

 

Iklan

 

2

3

3]

1

 

 

 

TUGAS 1       ( HURUF MUTU)

 

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 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

TUGAS 2 ( GOLANGAN )

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 txtnidn_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnama.SetFocus

End If

End Sub

TUGAS 1       ( HURUF MUTU)

 

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 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

TUGAS 2 ( GOLANGAN )

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 txtnidn_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnama.SetFocus

End If

End Sub

TUGAS 1       ( HURUF MUTU)

 

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 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

TUGAS 2 ( GOLANGAN )

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 txtnidn_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnama.SetFocus

End If

End Sub

TUGAS 3 DATA BUKU (TEXT)

 

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 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 Form_Load()

 

End Sub

Tugas 4 kode tiket

Private Sub cmdproses_click()

Dim S As String

S = (txtkt.Text)

If S = “MUT2212” Then

txtht.Text = “23000”

txtjk.Text = “MUTIARA”

txtjb.Text = “17.00”

txtjt.SetFocus

ElseIf S = “BIM2212” Then

txtht.Text = “50000”

txtjk.Text = “BIMA”

txtjb.Text = “16.00”

txtjt.SetFocus

ElseIf S = “EKO2212” Then

txtht.Text = “35000”

txtjk.Text = “EKONOMI”

txtjb.Text = “19.00”

txtjt.SetFocus

ElseIf S = “SEN2212” Then

txtht.Text = “75000”

txtjk.Text = “SENJA”

txtjb.Text = “20.00”

txtjt.SetFocus

End If

End Sub

 

 

 

 

Private Sub txtjt_keypress(keyascii As Integer)

If keyascii = 13 Then

Dim A, B, C As Single

A = txtht.Text

B = txtjt.Text

C = B * A

txttp.Text = C

End If

 

End Sub

 

Private Sub Cmdlagi_Click()

txtkt.SetFocus

txtkt.Text = “”

txtht.Text = “”

txtjk.Te xt = “”

txtjb.Text = “”

txtjt.Text = “”

txttp.Text = “”

 

End Sub

Private Sub cmdkeluar_click()

End

End Sub