TUGas 5

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

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

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

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.

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

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

wtqre43

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

Tugas vb

VISUAL BASIC 6.0 MEMBUAT APLIKASI PERHITUNGAN GAJI

11

Private Sub cmd_Kl_Click()

txt_gp = “”

txt_tj = “”

txt_po = “”

txt_gk = “”

txt_pa = “”

txt_gd = “”

End Sub

 

Private Sub cmd_Pros_Click()

txt_gk.Text = Val(txt_p.Text) + Val(txt_tj.Text) – Val(txt_po.Text)

txt_pa.Text = Val(txt_S.Text) * (0.1)

txt_gd.Text = Val(txt_S.Text) – Val(txt_pa.Text)

End Sub

 

Private Sub cmd_Ula_Click()

txt_gp = “”

txt_tj = “”

txt_po = “”

txt_gk = “”

txt_pa = “”

txt_gd = “”

End Sub

 

Private Sub txt_gp_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txt_tj.SetFocus

End If

End Sub

 

Private Sub txt_tj_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txt_R.SetFocus

End If

End Sub

Private Sub txt_po_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim gp, tj, po, gk, pa, gd As Double

txt_gk.Text = Val(txt_gp.Text) + Val(txt_tj.Text) – Val(txt_po.Text)

txt_pa.Text = Val(txt_gk.Text) * (0.1)

txt_gd.Text = Val(txt_gk.Text) – Val(txt_pa.Text)

End If

End Sub

 

VISUAL BASIC 6.0 MEMUAT PROGRAM FONT WARNA DAN FONT STYLE

2.3

Private Sub chkBold_Click()

If chkBold.Value = 1 Then

lblText.FontBold = True

Else

lblText.FontBold = 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 chkItalic_Click()

If chkItalic.Value = 1 Then

lblText.FontItalic = True

Else

lblText.FontItalic = False

End If

End Sub

 

Private Sub cmdExit_Click()

End

End Sub

 

 

 

Private Sub Label2_Click()

 

End Sub

 

Private Sub lblText_Click()

 

End Sub

 

Private Sub optRed_Click()

lblText.ForeColor = vbRed

End Sub

Private Sub optBlue_Click()

lblText.ForeColor = vbBlue

End Sub

Private Sub optGreen_Click()

lblText.ForeColor = vbGreen

End Sub

Private Sub optYellow_Click()

lblText.ForeColor = vbYellow

End Sub

VISUAL BASIC 6.0 MEMBUAT PROGRAM PEWARNAAN

3.1

Private Sub cmd_Ok_Click()

lbl_Output.Caption = txt_Input.Text

End Sub

 

Private Sub cmd_End_Click()

End

End Sub

 

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

 

End Sub

 

Private Sub opt_M_Click()

lbl_Output.ForeColor = vbRed

End Sub

 

Private Sub opt_B_Click()

lbl_Output.ForeColor = vbBlue

End Sub

 

Private Sub opt_H_Click()

lbl_Output.ForeColor = vbGreen

End Sub

 

Private Sub opt_K_Click()

lbl_Output.ForeColor = vbYellow

End Sub

 

Private Sub Chk_Te_Click()

lbl_Output.FontBold = Chk_Te.Value

End Sub

 

Private Sub Chk_Mi_Click()

lbl_Output.FontItalic = Chk_Mi.Value

End Sub

Private Sub Chk_GaBa_Click()

lbl_Output.FontUnderline = Chk_GaBa.Value

End Sub

Private Sub Chk_GaTe_Click()

lbl_Output.FontStrikethru = Chk_GaTe.Value

End Sub

 

 

 

Tugas Vb.

TUGAS     BAHASA     PEMROGRAMAN

 stmik

DI SUSUN OLEH

NAMA                 = TAMTOMI RIZAL CAHYONO

NPM                   = 14100077

KELAS               = WEBSITE 3 (EXECUTIVE)

JURUSAN           = SISTEM INFORMASI( S1)

Tugas 1( program data buku )

1

Private Sub cmdbt_Click()

Text1kb.SetFocus

Text1kb = ” ”

Text2nb = ” ”

Text3np = ” ”

Text4npm = ” ”

Text5tt = ” ”

End Sub

Private Sub cmdkl_Click()

End

End Sub

Private Sub cmdlg_Click()

Text1kb.SetFocus

Text1kb = ” ”

Text2nb = ” ”

Text3np = ” ”

Text4npm = ” ”

Text5tt = ” ”

End Sub

Private Sub Text1kb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2nb.SetFocus

End If

End Sub

Private Sub Text2nb_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text3np.SetFocus

End If

End Sub

Private Sub Text3np_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4npm.SetFocus

End If

End Sub

Private Sub Text4npm_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text5tt.SetFocus

End If

End Sub

TUGAS 2 (PERKALIAN 2 BILANGAN)

2-7

Private Sub Cmd_b_Click(Index As Integer)

Txt_a.Text = ““

Txt_b.Text = ““

Txt_c.Text = ““

End Sub

Private Sub Cmd_c_Click(Index As Integer)

End

End Sub

Private Sub Cmd_a_Click(Index As Integer)

Dim a, b, c As Single

a = Txt_a

b = Txt_b

c = a * b

Txt_c.Text = c

End Sub

Private Sub Label1_Click()

End Sub

Private Sub Txt_a_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_J.SetFocus

End If

End Sub

TUGAS 3 (  PERHITUNGAN HARGA SETELAH DISKON 10%)

6-7

Private Sub Cmd_B_Click()

Txt_1.Text = “”

Txt_2.Text = “”

Txt_12.Text = “”

Txt_3.Text = “”

Txt_4.Text = “”

Txt_34.Text = “”

Txt_5.Text = “”

Txt_6.Text = “”

Txt_56.Text = “”

Txt_7.Text = “”

Txt_8.Text = “”

Txt_78.Text = “”

End Sub

Private Sub Cmd_H_Click()

Txt_12.Text = Val(Txt_1) + Val(Txt_2)

Txt_34.Text = Val(Txt_3) – Val(Txt_4)

Txt_56.Text = Val(Txt_5) * Val(Txt_6)

Txt_78.Text = Val(Txt_7) / Val(Txt_8)

End Sub

Private Sub Cmd_K_Click()

End

End Sub

Private Sub Cmd_L_Click()

Txt_1.Text = “”

Txt_2.Text = “”

Txt_12.Text = “”

Txt_3.Text = “”

Txt_4.Text = “”

Txt_34.Text = “”

Txt_5.Text = “”

Txt_6.Text = “”

Txt_56.Text = “”

Txt_7.Text = “”

Txt_8.Text = “”

Txt_78.Text = “”

End Sub

Private Sub Label2_Click()

End Sub

Private Sub Txt_1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_2.SetFocus

End If

End Sub

Private Sub Txt_2_KeyPress(KeyAscii As Integer)

Txt_12.Text = Val(Txt_1) + Val(Txt_2)

End Sub

Private Sub Txt_3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_4.SetFocus

End If

End Sub

Private Sub Txt_5_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_6.SetFocus

End If

End Sub

Private Sub Txt_7_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txt_8.SetFocus

End If

End Sub

Private Sub Txt_4_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim C, D, CD As Single

C = Txt_3

D = Txt_4

CD = C – D

Txt_34.Text = CD

End If

End Sub

Private Sub Txt_6_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim E, F, EF As Single

E = Txt_5

F = Txt_6

EF = E * F

Txt_56.Text = EF

End If

End Sub

Private Sub Txt_8_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim G, H, GH As Single

G = Txt_7

H = Txt_8

GH = G – H

Txt_78.Text = GH

End If

End Sub

TUGAS 4 (PROGRAM KALKULATOR)

4-5 TERBARU

Private Sub Cmd_Hit_Click()
Dim a, b, c As Double
Txt_b.Text = Val(Txt_a.Text) * 0.1
Txt_c.Text = Val(Txt_a.Text) – Val(Txt_b.Text)
End Sub

Private Sub Cmd_Quit_Click()
End
End Sub

Private Sub Cmd_Ul_Click()
Txt_a.Text = “”
Txt_b.Text = “”
Txt_c.Text = “”
End Sub

Private Sub Txt_a_KeyPress(KeyAscii As Integer)
Dim a, b, c As Double
Txt_b.Text = Val(Txt_a.Text) * 0.1
Txt_c.Text = Val(Txt_a.Text) – Val(Txt_b.Text)
End Sub

blog da’wah

Keluarga

Tazkiyah

Renungan Harian

  • Ya Allah, Jauhkan Kami dari Murka-Mu

    ilustrasi berdoa @soundcloud Semoga kawan-kawan yang diberi kesadaran oleh Allah Swt dan peduli keselamatan bangsanya-baik untuk di dunia maupun akhirat-terus dikuatk…

    Read more

Opini