tugas 15

15

Private Sub CmdBatal_Click()
Txtnama.SetFocus
Txtnama = “”
Txtnpm = “”
Txtjr = “”
Txtprodi = “”
Txttm = “”
Txturut = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
Txtnama.SetFocus
Txtnama = “”
Txtnpm = “”
Txtjr = “”
Txtprodi = “”
Txttm = “”
Txturut = “”
End Sub

Private Sub CmdProses_Click()
Dim JR, PS As String
Txttm = “20” & Left(Txtnpm, 2)
S = Mid(Txtnpm, 3, 1)
If S = “1” Then
JR = “SISTEM INFORMASI”
PS = “STRATA SATU”
ElseIf S = “2” Then
JR = “MANAJEMEN INFORMATIKA”
PS = “DIPLOMA EMPAT”
ElseIf S = “3” Then
JR = “TEHNIK INFORMATIKA”
PS = “DIPLOMA TIGA”
ElseIf S = “4” Then
JR = “KOMPUTER AKUNTANSI”
PS = “DIPLOMA DUA”
End If
Txtjr = JR
Txtprodi = PS
Txturut = Right(Txtnpm, 5)
End Sub

Private Sub Txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim JR, PS As String
Txttm = “20” & Left(Txtnpm, 2)
S = Mid(Txtnpm, 3, 1)
If S = “1” Then
JR = “SISTEM INFORMASI”
PS = “STRATA SATU”
ElseIf S = “2” Then
JR = “MANAJEMEN INFORMATIKA”
PS = “DIPLOMA EMPAT”
ElseIf S = “3” Then
JR = “TEHNIK INFORMATIKA”
PS = “DIPLOMA TIGA”
ElseIf S = “4” Then
JR = “KOMPUTER AKUNTANSI”
PS = “DIPLOMA DUA”
End If
Txtjr = JR
Txtprodi = PS
Txturut = Right(Txtnpm, 5)
End If
End Sub

Iklan

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

tugas 12

12

Private Sub Cbokode_Click()
Dim kk, jk, hs As String
Select Case Cbokode.Text
Case “Asus A43SA”
Txtjk.Text = “Asus A53SA-VX090D”
Txths.Text = “5500000”
Case “Asus A43SD”
Txtjk.Text = “Asus A43SD-VX052D”
Txths.Text = “4500000”
Case “Asus A43SJ”
Txtjk.Text = “Asus A43SJ-VX792D”
Txths.Text = “4300000”
Case “Asus A43TA”
Txtjk.Text = “Asus A43TA-VX034D ”
Txths.Text = “4900000”
Case “Asus A43SL”
Txtjk.Text = “Asus A43SL-VX264SL”
Txths.Text = “4300000”
Case “Apple MD311”
Txtjk.Text = “Apple MacBook Pro MD311”
Txths.Text = “19300000”
Case “Apple MD313”
Txtjk.Text = “Apple MacBook Pro MD313”
Txths.Text = “24200000”
Case “Apple MD314”
Txtjk.Text = “Apple MacBook Pro MD314”
Txths.Text = “11900000”
Case “Apple MD322”
Txtjk.Text = “Apple MacBook Pro MD322”
Txths.Text = “14700000”
Case “Apple MC965”
Txtjk.Text = “Apple MacBook Air MC965”
Txths.Text = “19300000”
End Select

End Sub

Private Sub Cmdproses_Click()
Txthp.Text = Val(Txtjj.Text) * Val(Txths.Text)
If Txthp.Text > 40000000 Then
Txtdiscn.Text = Val(Txthp.Text) * 0.15
ElseIf Txthp.Text > 35000000 Then
Txtdiscn.Text = Val(Txthp.Text) * 0.1
ElseIf Txthp.Text > 30000000 Then
Txtdiscn.Text = Val(Txthp.Text) * 0.5
ElseIf Txthp.Text > 25000000 Then
Txtdiscn.Text = Val(Txthp.Text) * 0.2
End If
Txttotal.Text = Val(Txthp.Text) – Val(Txtdiscn.Text)

End Sub

Private Sub Cmdlagi_Click()
Cbokode.SetFocus
Cbokode.Text = “”
Txtjk.Text = “”
Txths.Text = “”
Txtjj.Text = “”
Txthp.Text = “”
Txtdiscn.Text = “”
Txttotal.Text = “”

End Sub

Private Sub Cmdkeluar_Click()
End
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 A43SL”
Cbokode.AddItem “Apple MD311”
Cbokode.AddItem “Apple MD313”
Cbokode.AddItem “Apple MD314”
Cbokode.AddItem “Apple MD322”
Cbokode.AddItem “Apple MC965”

End Sub

tugas 10

10

Private Sub Command1_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”
txtbp.Text = “600000”
Else
If txtprodi.Text = “Diploma Tiga” Then
txtup.Text = “150000”
txtbp.Text = “600000”
Else
If txtprodi.Text = “Diploma Satu” Then
txtup.Text = “150000”
txtbp.Text = “600000”
End If
End If
End If
txttotal.Text = Val(txtup.Text) + Val(txtbps.Text) + Val(txtub.Text) + Val(txtbp.Text)

End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
txtkelas.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtnu.Text = “”
txtup.Text = “”
txtbps.Text = “”
txtub.Text = “”
txtbp.Text = “”
txttotal.Text = “”
End Sub

Private Sub Command4_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
txtkelas.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtnu.Text = “”
txtup.Text = “”
txtbps.Text = “”
txtub.Text = “”
txtbp.Text = “”
txttotal.Text = “”

End Sub

Private Sub Text1_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” & 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 1

1

Private Sub cboKode_Click()
Dim mt, hs, TB As Integer
Select Case cbokode.Text
Case “Apple MC965 MacBook Air”
mt = “Apple MacBook Air MC965”
hs = “12800000”
Case “Apple MC966 MacBook Air”
mt = “Apple MacBook Air MC966”
hs = “15800000”
Case “Apple MC968 MacBook Air”
mt = “Apple MacBook Air MC968”
hs = “9900000”
Case “Apple MC969 MacBook Air”
mt = “Apple MacBook Air MC969”
hs = “11900000”
Case “Apple MC700 MacBook Pro”
mt = “Apple MacBook Pro MC700”
hs = “10800000”
Case “Apple MC721 MacBook Pro”
mt = “Apple MacBook Pro MC721”
hs = “15900000”
Case “Apple MC723 MacBook Pro”
mt = “Apple MacBook Pro MC723”
hs = “19300000”
Case “Apple MC724 MacBook Pro”
mt = “Apple MacBook Pro MC724”
hs = “13700000”
Case “Apple MC311 MacBook Pro”
mt = “Apple MacBook Pro MC311”
hs = “24200000”
Case “Apple MC313 MacBook Pro”
mt = “Apple MacBook Pro MC313”
hs = “11900000”
Case “Apple MC314 MacBook Pro”
mt = “Apple MacBook Pro MC314”
hs = “14700000”
Case “Apple MC318 MacBook Pro”
mt = “Apple MacBook Pro MC318”
hs = “17600000”
Case “Apple MC322 MacBook Pro”
mt = “Apple MacBook Pro MC322”
hs = “21300000”
Case “Apple MC965 MacBook Air”
mt = “Apple MacBook Air MC965”
hs = “12800000”
Case “Apple MC966 MacBook Air”
mt = “Apple MacBook Air MC966”
hs = “15800000”
End Select
txtmerk.Text = mt
txtharga.Text = hs
txtjumlah.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
cbokode.SetFocus
cbokode.Text = “”
txtmerk.Text = “”
txtharga.Text = “”
txtjumlah.Text = “”
txtharpen.Text = “”
txtdiskon.Text = “”
txttotal.Text = “”
End Sub

Private Sub cmdproses_Click()
txtharpen.Text = Val(txtharga) * Val(txtjumlah)
Select Case txtharpen.Text
Case Is > 140000000
txtdiskon.Text = Val(txtharpen) * 0.15
Case Is > 135000000
txtdiskon.Text = Val(txtharpen) * 0.1
Case Is > 130000000
txtdiskon.Text = Val(txtharpen) * 0.05
Case Is > 125000000
txtdiskon.Text = Val(txtharpen) * 0.02
End Select
txttotal.Text = Val(txtharpen) – Val(txtdiskon)
End Sub

Private Sub Form_Load()
cbokode.AddItem “Apple MC965 MacBook Air”
cbokode.AddItem “Apple MC966 MacBook Air”
cbokode.AddItem “Apple MC968 MacBook Air”
cbokode.AddItem “Apple MC969 MacBook Air”
cbokode.AddItem “Apple MC700 MacBook Pro”
cbokode.AddItem “Apple MC721 MacBook Pro”
cbokode.AddItem “Apple MC723 MacBook Pro”
cbokode.AddItem “Apple MC724 MacBook Pro”
cbokode.AddItem “Apple MC311 MacBook Pro”
cbokode.AddItem “Apple MC313 MacBook Pro”
cbokode.AddItem “Apple MC314 MacBook Pro”
cbokode.AddItem “Apple MC318 MacBook Pro”
cbokode.AddItem “Apple MC322 MacBook Pro”
cbokode.AddItem “Apple MC965 MacBook Air”
cbokode.AddItem “Apple MC966 MacBook Air”
End Sub

tugas 4

TUGAS 3.3

Private Sub Combo1_Click()
Dim nama, jurusan, hurufmutu As String
Select Case Combo1.Text
Case “14100422”
nama = “GALUH FIYAN PERMADI”
jurusan = “sistem informatika”
Case “14100571”
nama = “SARI YANTI”
jurusan = “manajemen informatika”
Case “14100572”
nama = “ASMAINI”
jurusan = “teknik informatika”
Case “14100573”
nama = “INAYATUL”
jurusan = “sistem informatika”
Case “14100574”
nama = “DWI ASTUTI”
jurusan = “sistem informatika”
Case “14100575”
nama = “ADELIA YUSTIKA”
jurusan = “teknik informatika”
Case “14100576”
nama = “EKA APRILIA”
jurusan = “sistem informatika”
Case “14100577”
nama = “WISMA JUDIN”
jurusan = “sistem informatika”
Case “14100578”
nama = “TIA ALFIANA”
jurusan = “sistem informatika”
Case “14100579”
nama = “HENI KARTIKA”
jurusan = “sistem informatika”
End Select
Text1.Text = nama
Text2.Text = jurusan
Text3.SetFocus
End Sub
Private Sub Form_Load()
Combo1.AddItem “14100422”
Combo1.AddItem “14100571”
Combo1.AddItem “14100572”
Combo1.AddItem “14100573”
Combo1.AddItem “14100574”
Combo1.AddItem “14100575”
Combo1.AddItem “14100576”
Combo1.AddItem “14100577”
Combo1.AddItem “14100578”
Combo1.AddItem “14100579”
Combo1.AddItem “14100580”
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text7.SetFocus
End If
End Sub
Private Sub Command_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(textquis.Text)
TUGAS = Val(texttugas.Text)
UTS = Val(textuts.Text)
UAS = Val(textuas.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
textna.Text = NA

Select Case textna.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
texthm.Text = HM
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
Text7 = “”
End Sub
Private Sub Command3_Click()
End
End Sub