Selasa, 12 Desember 2017

TUGAS 3.4

TUGAS 3.4


Source Code:


Private Sub cmdbatal_Click()
cbokode = ""
txtjudul = ""
txtpengarang = ""
txttahun = ""
txtpenerbit = ""
txtharga = ""
cbokode.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
cbokode = ""
txtjudul = ""
txtpengarang = ""
txttahun = ""
txtpenerbit = ""
txtharga = ""
cbokode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim A As String
A = Left(cbokode, 1)
If A = "A" Then
txtpenerbit = "Andi Offset Yogyakarta"
ElseIf A = "I" Then
txtpenerbit = "Indah Surabaya"
ElseIf A = "S" Then
txtpenerbit = "Salemba Empat"
ElseIf A = "E" Then
txtpenerbit = "Elek Media Komputindo"
ElseIf A = "M" Then
txtpenerbit = "Maxicom"
End If
A = Mid(cbokode, 3, 3)
If A = "SIM" Then
txtjudul = "Sistem Informasi Manajemen"
txtpengarang = "Yati Nur Oktavia"
txtharga = "75900"
ElseIf A = "EDP" Then
txtjudul = "Elektronik Data Processing"
txtpengarang = "Imam Tarmizi"
txtharga = "62000"
ElseIf A = "MNJ" Then
txtjudul = "Manajemen"
txtpengarang = "Valentina Mariana Adiwianti"
txtharga = "42000"
ElseIf A = "CDR" Then
txtjudul = "Corel Draw"
txtpengarang = "Riyan Suhandi"
txtharga = "53000"
ElseIf A = "RPL" Then
txtjudul = "Rekayasa Perangkat Lunak"
txtpengarang = "Sinta Umpu Singa"
txtharga = "83000"
End If
txttahun = "20" & Right(cbokode, 2)
End Sub

Private Sub Form_Load()
cbokode.AddItem "A-SIM-01"
cbokode.AddItem "I-EDP-02"
cbokode.AddItem "S-MNJ-03"
cbokode.AddItem "E-CDR-04"
cbokode.AddItem "M-RPL-05"
End Sub

TUGAS 3.3

TUGAS 3.3


Source Code:

Private Sub cbokode_Click()
Dim merk As String
merk = Mid(cbokode, 7, 5)
If merk = "MC965" Then
txtmerk = "Apple MacBook Air MC965"
harga = "12800000"
ElseIf merk = "MC966" Then
txtmerk = "Apple MacBook Air MC966"
harga = "15800000"
ElseIf merk = "MC968" Then
txtmerk = "Apple MacBook Air MC968"
harga = "9900000"
ElseIf merk = "MC969" Then
txtmerk = "Apple MacBook Air MC969"
harga = "11900000"
ElseIf merk = "MC700" Then
txtmerk = "Apple MacBook Pro MC700"
harga = "10800000"
ElseIf merk = "MC721" Then
txtmerk = "Apple MacBook Pro MC721"
harga = "15900000"
ElseIf merk = "MC723" Then
txtmerk = "Apple MacBook Pro MC723"
harga = "19300000"
ElseIf merk = "MC724" Then
txtmerk = "Apple MacBook Pro MC724"
harga = "13700000"
ElseIf merk = "MC311" Then
txtmerk = "Apple MacBook Pro MC311"
harga = "24200000"
ElseIf merk = "MC313" Then
txtmerk = "Apple MacBook Pro MC313"
harga = "11900000"
ElseIf merk = "MC314" Then
txtmerk = "Apple MacBook Pro MC314"
harga = "14700000"
ElseIf merk = "MC318" Then
txtmerk = "Apple MacBook Pro MC318"
harga = "17600000"
ElseIf merk = "MC322" Then
txtmerk = "Apple MacBook Pro MC322"
harga = "21300000"
ElseIf merk = "MC965" Then
txtmerk = "Apple MacBook Air MC965"
harga = "12800000"
ElseIf merk = "MC966" Then
txtmerk = "Apple MacBook Air MC966"
harga = "15800000"
End If
txths = harga
txtjj.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
cbokode = ""
txtmerk = ""
txths = ""
txtjj = ""
txthp = ""
txtdis = ""
txttb = ""
cbokode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim harga, dis, total As String
harga = Val(txtjj) * (txths)
txthp = harga
If txthp > "140000000" Then
dis = Val(txthp) * 0.15
ElseIf txthp > "135000000" Then
dis = Val(txthp) * 0.1
ElseIf txthp > "130000000" Then
dis = Val(txthp) * 0.05
ElseIf txthp > "125000000" Then
dis = Val(txthp) * 0.02
End If
txtdis = dis
txttb = Val(txthp) - Val(txtdis)
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 3.2

TUGAS 3.2


Source Code:

Private Sub cmdbatal_Click()
txtnama = ""
txtnpm = ""
txtjurusan = ""
txtprogram = ""
txttahun = ""
txtnomor = ""
txtnama.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnama = ""
txtnpm = ""
txtjurusan = ""
txtprogram = ""
txttahun = ""
txtnomor = ""
txtnama.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim pro As String
txttahun = "20" & Left(txtnpm, 2)
pro = Mid(txtnpm, 3, 1)
If pro = "1" Then
txtjurusan = "Sistem Informasi"
ElseIf pro = "2" Then
txtjurusan = "Manajemen Informasi"
ElseIf pro = "3" Then
txtjurusan = "Teknik Informasi"
End If
pro = Mid(txtnpm, 4, 2)
If pro = "00" Then
txtprogram = "Strata Satu"
ElseIf pro = "01" Then
txtprogram = "Diplomat Tiga"
ElseIf pro = "02" Then
txtprogram = "Diplomat Empat"
End If
txtnomor = Right(txtnpm, 3)
End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End Sub

TUGAS 3.1

TUGAS 3.1


Source Code:

Private Sub cbogolongan_Click()
Dim gaji, tunjangan, pajak, total As Variant
Select Case cbogolongan
Case "I"
gaji = 1500000
tunjangan = 150000
Case "II"
gaji = 2000000
tunjangan = 200000
Case "III"
gaji = 2500000
tunjangan = 250000
Case "IV"
gaji = 3000000
tunjangan = 300000
gaji = 0
tunjangan = 0
End Select
total = gaji + tunjangan
pajak = total * 0.1
txtgaji = gaji
txtpajak = pajak
txttunjangan = tunjangan
txttotal = total - pajak
End Sub

Private Sub cmdbatal_Click()
txtnpm = ""
txtnama = ""
cbogolongan = ""
txtgaji = ""
txttunjangan = ""
txtpajak = ""
txttotal = ""
txtnpm.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnpm = ""
txtnama = ""
cbogolongan = ""
txtgaji = ""
txttunjangan = ""
txtpajak = ""
txttotal = ""
txtnpm.SetFocus
End Sub

Private Sub Form_Load()
cbogolongan.AddItem "I"
cbogolongan.AddItem "II"
cbogolongan.AddItem "III"
cbogolongan.AddItem "IV"
End Sub

Private Sub txtnpm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

Selasa, 21 November 2017

Tugas 2.8

Tugas 2.8
Huruf Mutu Mahasiswa Menggunakan Keypress


Source Code :

Private Sub Cbonpm_Change()
Dim nama, jurusan, HM As String
Select Case Cbonpm.Text
Case "17100011"
nama = "ARIANSYAH"
jurusan = "Sistem Informasi"
Case "17100002"
nama = "BHADI RAMADHANI"
jurusan = "Sistem Informasi"
Case "17100012"
nama = "DIMAS APRINGGA YUANTORO"
jurusan = "Sistem Informasi"
Case "17100004"
nama = "EKA KARTIKA PERTIWI"
jurusan = "Sistem Informasi"
Case "17100022"
nama = "FUAIDIN AMIN"
jurusan = "Sistem Informasi"
Case "17100013"
nama = "IRMANIDA SISWANTI"
jurusan = "Sistem Informasi"
End Select
txtnama.Text = nama
txtjurusan.Text = jurusan
txtquis.SetFocus
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 Form_Load()
Cbonpm.AddItem "17100002"
Cbonpm.AddItem "17100004"
Cbonpm.AddItem "17100011"
Cbonpm.AddItem "17100012"
Cbonpm.AddItem "17100013"
Cbonpm.AddItem "17100022"
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 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

Private Sub txtuts_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtuas.SetFocus
End If
End Sub

Tugas 2.7

Tugas 2.7
Huruf Mutu Mahasiswa Tanpa Keypress


Source Code :

Private Sub Cbonpm_Change()
Dim nama, jurusan, HM As String
Select Case Cbonpm.Text
Case "17100011"
nama = "ARIANSYAH"
jurusan = "Sistem Informasi"
Case "17100002"
nama = "BHADI RAMADHANI"
jurusan = "Sistem Informasi"
Case "17100012"
nama = "DIMAS APRINGGA YUANTORO"
jurusan = "Sistem Informasi"
Case "17100004"
nama = "EKA KARTIKA PERTIWI"
jurusan = "Sistem Informasi"
Case "17100022"
nama = "FUAIDIN AMIN"
jurusan = "Sistem Informasi"
Case "17100013"
nama = "IRMANIDA SISWANTI"
jurusan = "Sistem Informasi"
End Select
txtnama.Text = nama
txtjurusan.Text = jurusan
txtquis.SetFocus
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 Form_Load()
Cbonpm.AddItem "17100002"
Cbonpm.AddItem "17100004"
Cbonpm.AddItem "17100011"
Cbonpm.AddItem "17100012"
Cbonpm.AddItem "17100013"
Cbonpm.AddItem "17100022"
End Sub

Tugas 2.6

Tugas 2.6
Mengedit Nama


Source Code :

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check1.Value
End Sub

Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Option1_Click()
Label2.ForeColor = vbBlue
End Sub

Private Sub Option2_Click()
Label2.ForeColor = vbRed
End Sub

Tugas Etika Profesi

1.  Pinjaman online adalah fasilitas pinjaman uang oleh penyedia jasa keuangan yang beroperasi secara online. Penyedia pinjaman online terse...