Private Sub Combo1_Click()
Select Case Combo1.Text
Case “Apple MC965 Macbook Air”
Text1.Text = “Apple Macbook Air MC965”
Text2.Text = “12800000”
Case “Apple MC966 Macbook Air”
Text1.Text = “Apple Macbook Air MC966”
Text2.Text = “15800000”
Case “Apple MC968 Macbook Air”
Text1.Text = “Apple Macbook Air MC968”
Text2.Text = “9900000”
Case “Apple MC969 Macbook Air”
Text1.Text = “Apple Macbook Air MC969”
Text2.Text = “11900000”
Case “Apple MC700 Macbook Pro”
Text1.Text = “Apple Macbook Pro MC700”
Text2.Text = “10800000”
Case “Apple MC721 Macbook Pro”
Text1.Text = “Apple Macbook Pro MC721”
Text2.Text = “15900000”
Case “Apple MC723 Macbook Pro”
Text1.Text = “Apple Macbook Pro MC723”
Text2.Text = “19300000”
Case “Apple MC724 Macbook Pro”
Text1.Text = “Apple Macbook Pro MC724”
Text2.Text = “13700000”
Case “Apple MC311 Macbook Pro”
Text1.Text = “Apple Macbook Pro MC311”
Text2.Text = “24200000”
Case “Apple Macbook Pro MC313”
Text1.Text = “Apple Macbook Pro MC313”
Text2.Text = “11900000”
Case “Apple Macbook Pro MC314”
Text1.Text = “Apple Macbook Pro MC314”
Text2.Text = “14700000”
Case “Apple Macbook Pro MC318”
Text1.Text = “Apple Macbook Pro MC318”
Text2.Text = “17600000”
Case “Apple Macbook Pro MC322”
Text1.Text = “Apple Macbook Pro MC322”
Text2.Text = “21300000”
Case “Apple MC965 Macbook Air”
Text1.Text = “Apple Macbook Air MC965”
Text2.Text = “12800000”
Case “Apple MC966 Macbook Air”
Text1.Text = “Apple Macbook Air MC966”
Text2.Text = “15800000”
End Select
End Sub
Private Sub Command1_Click()
Text4.Text = Val(Text3.Text) * Val(Text2.Text)
If Text4.Text > 140000000 Then
Text5.Text = Val(Text4.Text) * 0.15
ElseIf Text4.Text > 135000000 Then
Text5.Text = Val(Text4.Text) * 0.1
ElseIf Text4.Text > 130000000 Then
Text5.Text = Val(Text4.Text) * 0.05
ElseIf Text4.Text > 125000000 Then
Text5.Text = Val(Text4.Text) * 0.02
End If
Text6.Text = Val(Text4.Text) – Val(Text5.Text)
End Sub
Private Sub Command2_Click()
Combo1.SetFocus
Combo1 = “”
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Combo1.AddItem “Apple MC965 Macbook Air”
Combo1.AddItem “Apple MC966 Macbook Air”
Combo1.AddItem “Apple MC968 Macbook Air”
Combo1.AddItem “Apple MC969 Macbook Air”
Combo1.AddItem “Apple MC700 Macbook Pro”
Combo1.AddItem “Apple MC721 Macbook Pro”
Combo1.AddItem “Apple MC723 Macbook Pro”
Combo1.AddItem “Apple MC724 Macbook Pro”
Combo1.AddItem “Apple MC311 Macbook Pro”
Combo1.AddItem “Apple MC313 Macbook Pro”
Combo1.AddItem “Apple MC314 Macbook Pro”
Combo1.AddItem “Apple MC318 Macbook Pro”
Combo1.AddItem “Apple MC322 Macbook Pro”
Combo1.AddItem “Apple MC965 Macbook Air”
Combo1.AddItem “Apple MC966 Macbook Air”
End Sub
Private Sub Combo1_Click()
Select Case Combo1.Text
Case “P205”
Text1.Text = “Pentium II 500 Mega Hz”
Text2.Text = “1500000”
Case “P308”
Text1.Text = “Pentium III 800 Mega Hz”
Text2.Text = “2100000”
Case “310”
Text1.Text = “Pentium III 1.0 Giga Hz”
Text2.Text = “3500000”
Case “P415”
Text1.Text = “Pentium IV 1.5 Giga Hz”
Text2.Text = “4000000”
Case “417”
Text1.Text = “Pentium IV 1.7 Giga Hz”
Text2.Text = “4200000”
Case “419”
Text1.Text = “Pentium IV 1.9 Giga Hz”
Text2.Text = “5500000”
End Select
End Sub
Private Sub Command1_Click()
Text4.Text = Val(Text3.Text) * Val(Text2.Text)
If Text4.Text > 30000000 Then
Text5.Text = Val(Text4.Text) * 0.15
ElseIf Text4.Text > 25000000 Then
Text5.Text = Val(Text4.Text) * 0.1
ElseIf Text4.Text > 20000000 Then
Text5.Text = Val(Text4.Text) * 0.05
ElseIf Text4.Text > 15000000 Then
Text5.Text = Val(Text4.Text) * 0.2
End If
Text6.Text = Val(Text4.Text) – Val(Text5.Text)
End Sub
Private Sub Command2_Click()
Combo1.SetFocus
Combo1.Text = “”
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Combo1.AddItem “P205”
Combo1.AddItem “P308”
Combo1.AddItem “P310”
Combo1.AddItem “P415”
Combo1.AddItem “P417”
Combo1.AddItem “P419”
End Sub
TUGAS 7
Source Code
Private Sub Command1_Click()
Dim A, B, C, D As String
Dim H As Double
Text3.Text = “20” & Right(Combo1.Text, 2)
A = Mid(Combo1.Text, 3, 3)
If A = “SIM” Then
B = “SISTEM INFORMASI MANAJEMEN”
C = “YATI NUR OKTAVIA”
H = “75900”
ElseIf A = “MNJ” Then
B = “MANAJEMEN”
C = “VALENTINA MARIANA ADIWIANTI”
H = “42000”
ElseIf A = “EDP” Then
B = “ELEKTRONIK DATA PROCESSING”
C = “IMAM TARMIZI”
H = “62000”
ElseIf A = “CDR” Then
B = “COREL DRAW”
C = “RIYAN SUHANDI”
H = “53000”
ElseIf A = “RPL” Then
B = “REKAYASA PERANGKAT LUNAK”
C = “SINTA UMPU SINAGA”
H = “83000”
End If
Text1.Text = B
Text2.Text = C
Text5.Text = H
D = Left(Combo1.Text, 1)
If D = “A” Then
Text4.Text = ” ANDY OFFSET YOGYAKARTA”
ElseIf D = “I” Then
Text4.Text = “INDAH SURABAYA”
ElseIf D = “M” Then
Text4.Text = “MAXICOM”
ElseIf D = “S” Then
Text4.Text = “SALEMBA EMPAT”
ElseIf D = “E” Then
Text4.Text = “ELEK MEDIA KOMPUTINDO”
End If
End Sub
Private Sub Command2_Click()
Combo1.SetFocus
Combo1.Text = “”
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
End Sub
Private Sub Command3_Click()
Combo1.SetFocus
Combo1.Text = “”
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Form_Load()
Combo1.AddItem “A-SIM-O1”
Combo1.AddItem “I-EDP-O2”
Combo1.AddItem “S-MNJ-O3”
Combo1.AddItem “E-CDR-O4”
Combo1.AddItem “M-RPL-O5”
End Sub
TUGAS 8
Source Code
Private Sub Command1_Click()
Dim JK As String
Dim HT, JB As Variant
A = Left(Text1.Text, 3)
If A = “BIM” Then
JK = “BIMA”
HT = “50000”
JB = “16.00”
ElseIf A = “EKO” Then
JK = “EKONOMI”
HT = “35000”
JB = “19.00”
ElseIf A = “MUT” Then
JK = “MUTIARA”
HT = “23000”
JB = “17.00”
ElseIf A = “SEN” Then
JK = “SENJA”
HT = “15000”
JB = “20.00”
End If
Text2.Text = HT
Text3.Text = JK
Text4.Text = JB
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Text1_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.Text = Val(Text2.Text) * Val(Text5.Text)
End If
End Sub
TUGAS 9
Source Code
Private Sub Command1_Click()
Dim JB, PG, PR As String
Dim TT, HR As Variant
A = Left(Text1.Text, 3)
If A = “SIM” Then
JB = “Sistem Informasi Manajemen”
PG = “Fadiya Ulfa”
HR = “75900”
ElseIf A = “EDP” Then
JB = “Elektronik Data Processing”
PG = “Nurul Aguatina”
HR = “62000”
ElseIf A = “MNJ” Then
JB = “Manajemen”
PG = “Rina Hidayat”
HR = “42000”
ElseIf A = “CDR” Then
JB = “Corel Draw”
PG = “Siti Nur Khotimah”
HR = “53000”
ElseIf A = “RPL” Then
JB = “Rekayasa Perangkat Lunak”
PG = “Winda Erlianti”
HR = “83000”
End If
Text2.Text = JB
Text3.Text = PG
Text6.Text = HR
Text4.Text = “20” & Mid(Text1.Text, 5, 2)
B = Right(Text1.Text, 1)
If B = “A” Then
PR = “Andi Offset Yogyakarta”
ElseIf B = “I” Then
PR = “Indah Surabaya”
ElseIf B = “S” Then
PR = “Salemba Empat”
ElseIf B = “E” Then
PR = “Elek Media Koputindo”
ElseIf B = “M” Then
PR = “Maxicom”
End If
Text5.Text = PR
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub
Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
End Sub
Private Sub Command4_Click()
End
End Sub
TUGAS 10
Source Code
Private Sub Cmdbatal_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtkelas.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtnu.Text = “”
txtup.Text = “”
txtbps.Text = “”
txtub.Text = “”
txtbp.Text = “”
txttotal.Text = “”
End Sub
Private Sub Cmdkeluar_Click()
End
End Sub
Private Sub Cmdlagi_Click()
txtnama.SetFocus
txtnama.Text = “”
txtnpm.Text = “”
txtkelas.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtnu.Text = “”
txtup.Text = “”
txtbps.Text = “”
txtub.Text = “”
txtbp.Text = “”
txttotal.Text = “”
End Sub
Private Sub Cmdproses_Click()
Dim S As String
S = Left(txtnpm, 1)
If S = “E” Then
txtkelas.Text = “Eksekutif”
txtub.Text = “1250000”
ElseIf S = “R” Then
txtkelas.Text = “Reguler”
txtub.Text = “1000000”
End If
S = Mid(txtnpm, 6, 2)
If S = “00” Then
txtprodi.Text = “Strata Satu”
If txtkelas.Text = “Reguler” Then
txtbps.Text = “1500000”
Else
txtbps.Text = “1900000”
End If
ElseIf S = “01” Then
txtprodi.Text = “Diploma Tiga”
If txtkelas.Text = “Reguler” Then
txtbps.Text = “1250000”
Else
txtbps.Text = “1650000”
End If
ElseIf S = “02” Then
txtprodi.Text = “Diploma Satu”
If txtkelas.Text = “Reguler” Then
txtbps.Text = “1250000”
Else
txtbps.Text = “1350000”
End If
End If
S = Mid(txtnpm, 5, 1)
If S = “1” Then
txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
txtjur.Text = “Manajemen Informatika”
ElseIf S = “3” Then
txtjur.Text = “Manajemendan Komp. Akuntansi”
End If
txttm.Text = “20” & Mid(txtnpm.Text, 3, 2)
txtnu.Text = Right(txtnpm, 3)
If txtprodi.Text = “Strata Satu” Then
txtup.Text = “200000”
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 Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub
Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtnu.Text = “”
Txtbp.Text = “”
End Sub
Private Sub Cmdkeluar_Click()
End
End Sub
Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtprodi.Text = “”
txttm.Text = “”
txtnu.Text = “”
Txtbp.Text = “”
End Sub
Private Sub Cmdproses_Click()
Dim S As String
txttm.Text = “20” & Left(txtnpm.Text, 2)
S = Mid(txtnpm.Text, 3, 1)
If S = “1” Then
txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
txtjur.Text = “Teknik Informatika”
ElseIf S = “3” Then
txtjur.Text = “Manajemen Informatika”
ElseIf S = “4” Then
txtjur.Text = “Manajemen & Komp. Akuntansi”
End If
S = Mid(txtnpm.Text, 4, 2)
If S = “00” Then
txtprodi.Text = “Strata Satu”
Txtbp.Text = “1950000”
ElseIf S = “01” Then
txtprodi.Text = “Diploma Empat”
Txtbp.Text = “1750000”
ElseIf S = “02” Then
txtprodi.Text = “Diploma Tiga”
Txtbp.Text = “1650000”
ElseIf S = “03” Then
txtprodi.Text = “Diploma Dua”
Txtbp.Text = “1450000”
End If
txtnu.Text = Right(txtnpm.Text, 3)
End Sub
Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub
TUGAS 12
Source Code
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 Cmdhitunglagi_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 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 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 13
Source Code
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 14
Source Code
Private Sub cmdkeluar_Click()
End
End Sub
Private Sub cmdlagi_Click()
txtmnk.SetFocus
txtmnk.Text = “”
txtmn.Text = “”
txtgol.Text = “”
txtks.Text = “”
txts.Text = “”
txtt.Text = “”
txtj.Text = “”
txtb.Text = “”
txtgapok.Text = “”
txttnj.Text = “”
txttotal.Text = “”
End Sub
Private Sub cmdproses_Click()
Dim r As String
r = Mid(txtmn.Text, 5, 1)
If r = “A” Then
txtgol = “A”
txtj.Text = “MANAGER”
txtgapok.Text = “4000000”
txttnj.Text = “1025000”
ElseIf r = “B” Then
txtgol.Text = “B”
txtj.Text = “Ka.SEKSI”
txtgapok.Text = “3500000”
txttnj.Text = “975000”
ElseIf r = “C” Then
txtgol.Text = “C”
txtj.Text = “STAFF”
txtgapok.Text = “3000000”
txttnj.Text = “925000”
End If
r = Right(txtmn.Text, 3)
If r = “KEU” Then
txtb.Text = “ACCOUNTING”
ElseIf r = “ADM” Then
txtb.Text = “ADMINISTRASI”
ElseIf r = “SDM” Then
txtb.Text = “GENERAL AFFAIR”
ElseIf r = “EDP” Then
txtb.Text = “IT UNIT”
ElseIf r = “SPM” Then
txtb.Text = “SECURITY”
End If
r = Mid(txtmn.Text, 7, 1)
If r = “S” Then
kode = “S”
Status = “SINGEL”
ElseIf r = “M” Then
kode = “M”
Status = “MENIKAH”
ElseIf r = “J” Then
kode = “J”
Status = “JANDA”
ElseIf r = “D” Then
kode = “D”
Status = “DUDA”
End If
txtks.Text = kode
txts.Text = Status
txtt.Text = Left(txtmn.Text, 4)
txttotal.Text = Val(txtgapok.Text) + Val(txttnj.Text)
End Sub
Private Sub Form_Activate()
txtmnk.SetFocus
End Sub
Private Sub txtmnk_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtmn.SetFocus
End If
End Sub
Private Sub cmdbatal_Click()
txtmnk.SetFocus
txtmnk.Text = “”
txtmn.Text = “”
txtgol.Text = “”
txtks.Text = “”
txts.Text = “”
txtt.Text = “”
txtj.Text = “”
txtb.Text = “”
txtgapok.Text = “”
txttnj.Text = “”
txttotal.Text = “”
End Sub