Selasa, 12 Desember 2017

TUGAS 3.7

TUGAS 3.7


Source Code:

Private Sub cmdbatal_Click()
txtnama = ""
txtnik = ""
txtgolongan = ""
txtkode = ""
txtstatus = ""
txttahun = ""
txtjabatan = ""
txtbagian = ""
txtgaji = ""
txttunjangan = ""
txttotal = ""
txtnama.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnama = ""
txtnik = ""
txtgolongan = ""
txtkode = ""
txtstatus = ""
txttahun = ""
txtjabatan = ""
txtbagian = ""
txtgaji = ""
txttunjangan = ""
txttotal = ""
txtnama.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim S As String
txttahun = Left(txtnik, 4)
S = Mid(txtnik, 5, 1)
If S = "A" Then
txtgolongan = "A"
txtjabatan = "Manajer"
txtgaji = "4000000"
txttunjangan = "1025000"
ElseIf S = "B" Then
txtgolongan = "B"
txtjabatan = "Ka. Seksi"
txtgaji = "3500000"
txttunjangan = "975000"
ElseIf S = "C" Then
txtgolongan = "C"
txtjabatan = "Staff"
txtgaji = "3000000"
txttunjangan = "925000"
End If
S = Mid(txtnik, 7, 1)
If S = "S" Then
txtkode = "S"
txtstatus = "Single"
ElseIf S = "M" Then
txtkode = "M"
txtstatus = "Menikah"
ElseIf S = "J" Then
txtkode = "J"
txtstatus = "Janda"
ElseIf S = "D" Then
txtkode = "D"
txtstatus = "Duda"
End If
S = Right(txtnik, 3)
If S = "KEU" Then
txtbagian = "Accounting"
ElseIf S = "ADM" Then
txtbagian = "Administrasi"
ElseIf S = "SDM" Then
txtbagian = "General Affair"
ElseIf S = "EDP" Then
txtbagian = "IT Unit"
ElseIf S = "SPM" Then
txtbagian = "Security"
End If
txttotal = Val(txtgaji) + Val(txttunjangan)
End Sub

TUGAS 3.6

TUGAS 3.6


Source Code:


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

Private Sub cmdkeluar_Click()
End
End Sub

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

Private Sub cmdproses_Click()
Dim A As String
A = Left(txtkode, 3)
If A = "SIM" Then
txtjudul = "Sistem Informasi Manajemen"
txtpengarang = "Fadiya Ulfa"
txtharga = "75900"
ElseIf A = "EDP" Then
txtjudul = "Elektronik Data Processing"
txtpengarang = "Nurul Agustina"
txtharga = "62000"
ElseIf A = "MNJ" Then
txtjudul = "Manajemen"
txtpengarang = "Rian Hidayat"
txtharga = "42000"
ElseIf A = "CDR" Then
txtjudul = "Corel Draw"
txtpengarang = "Siti Nur Khotimah"
txtharga = "53000"
ElseIf A = "RPL" Then
txtjudul = "Rekayasa Perangkat Lunak"
txtpengarang = "Winda Erlianti"
txtharga = "83000"
End If
txttahun = "20" & Mid(txtkode, 5, 2)
A = Right(txtkode, 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
End Sub

TUGAS 3.5

TUGAS 3.5


Source Code:

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtkt = ""
txtht = ""
txtjk = ""
txtjb = ""
txtjt = ""
txttotalp = ""
txtkt.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim B As String
B = Left(txtkt, 3)
If B = "BIM" Then
txtht = "50000"
txtjk = "BIMA"
txtjb = "16.00"
ElseIf B = "EKO" Then
txtht = "35000"
txtjk = "EKONOMI"
txtjb = "19.00"
ElseIf B = "MUT" Then
txtht = "23000"
txtjk = "MUTIARA"
txtjb = "17.00"
ElseIf B = "SEN" Then
txtht = "15000"
txtjk = "SENJA"
txtjb = "20.00"
End If
txtjt.SetFocus
End Sub

Private Sub txtjt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotalp = Val(txtht) * (txtjt)
End If
End Sub

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 2.5

Tugas 2.5
Membuat Font Color dan Font Style



Source Code :

Private Sub chkBold_Click()
If chkBold.Value = 1 Then
lblTeks.FontBold = True
Else
lblTeks.FontBold = False
End If
End Sub

Private Sub chkItalic_Click()
If chkItalic.Value = 1 Then
lblTeks.FontItalic = True
Else
lblTeks.FontItalic = False
End If
End Sub

Private Sub chkStrikeout_Click()
If chkStrikeout.Value = 1 Then
lblTeks.FontStrikethru = True
Else
lblTeks.FontStrikethru = False
End If
End Sub

Private Sub chkUnderline_Click()
If chkUnderline.Value = 1 Then
lblTeks.FontUnderline = True
Else
lblTeks.FontUnderline = False
End If
End Sub

Private Sub cmdExit_Click()
End
End Sub

Private Sub optBlue_Click()
lblTeks.ForeColor = vbBlue
End Sub

Private Sub optGreen_Click()
lblTeks.ForeColor = vbGreen
End Sub

Private Sub optRed_Click()
lblTeks.ForeColor = vbRed
End Sub

Private Sub optYellow_Click()
lblTeks.ForeColor = vbYellow
End Sub

Tugas 2.4

Tugas 2.4
Perhitungan Gaji Menggunakan Keypress


Source Code :

Private Sub cmdKeluar_Click()
End
End Sub

Private Sub cmdProses_Click()
Dim A, B, C, D, E, F As Double
txtD.Text = Val(txtA.Text) + Val(txtB.Text) - Val(txtC.Text)
txtE.Text = Val(txtD.Text) * (0.1)
txtF.Text = Val(txtD.Text) - Val(txtE.Text)
End Sub

Private Sub cmdUlang_Click()
txtA = ""
txtB = ""
txtC = ""
txtD = ""
txtE = ""
txtF = ""
End Sub

Private Sub txtC_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim A, B, C, D, E, F As Double
txtD.Text = Val(txtA.Text) + Val(txtB.Text) - Val(txtC.Text)
txtE.Text = Val(txtD.Text) * (0.1)
txtF.Text = Val(txtD.Text) - Val(txtE.Text)
End If
End Sub

Tugas 2.3

Tugas 2.3
Penghitungan Gaji Tanpa Keypress


Source Code :


Private Sub cmdKeluar_Click()
End
End Sub

Private Sub cmdProses_Click()
Dim A, B, C, D, E, F As Double
txtD.Text = Val(txtA.Text) + Val(txtB.Text) - Val(txtC.Text)
txtE.Text = Val(txtD.Text) * (0.1)
txtF.Text = Val(txtD.Text) - Val(txtE.Text)
End Sub

Private Sub cmdUlang_Click()
txtA = ""
txtB = ""
txtC = ""
txtD = ""
txtE = ""
txtF = ""
End Sub

Tugas 2.2

Tugas 2.2
Perhitungan Mutu Menggunakan Keypress


Source Code :

Private Sub cmdHitung_Click()
Dim A, B, C As Double
txtB.Text = Val(txtA.Text) * 0.1
txtC.Text = Val(txtA.Text) - Val(txtB.Text)
End Sub

Private Sub cmdQuit_Click()
End
End Sub

Private Sub cmdUlang_Click()
txtA = ""
txtB = ""
txtC = ""
End Sub

Private Sub txtB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim A, B, C As Double
txtB.Text = Val(txtA.Text) * 0.1
txtC.Text = Val(txtA.Text) - Val(txtB.Text)
End If
End Sub

Tugas 2.1

Tugas 2.1
Perhitungan Harga Tanpa Keypress


Source Code :

Private Sub cmdHitung_Click()
Dim A, B, C As Double
txtB.Text = Val(txtA.Text) * 0.1
txtC.Text = Val(txtA.Text) - Val(txtB.Text)
End Sub

Private Sub cmdQuit_Click()
End
End Sub

Private Sub cmdUlang_Click()
txtA = ""
txtB = ""
txtC = ""
End Sub

Selasa, 14 November 2017

Tugas 1.6

Tugas 1.6


HASIL PERHITUNGAN DAPAT KELUAR DENGAN MENEKAN TOMBO COMMAND HITUNG DAN KEYPRESS (TOMBOL ENTER)


 source code:


Private Sub cmdhitung_Click()
txt3 = Val(txt1) + Val(txt2)
txt6 = Val(txt4) / Val(txt5)
txt9 = Val(txt7) - Val(txt8)
txt12 = Val(txt10) * Val(txt11)
End Sub

Private Sub cmdbatal_Click()
txt1 = ""
txt2 = ""
txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txt9 = ""
txt10 = ""
txt11 = ""
txt12 = ""
txt1.SetFocus
End Sub

Private Sub cmdlagi_Click()
txt1 = ""
txt2 = ""
txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txt9 = ""
txt10 = ""
txt11 = ""
txt12 = ""
txt1.SetFocus
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub txt1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt2.SetFocus
End If
End Sub

Private Sub txt2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt4.SetFocus
End If
End Sub

Private Sub txt4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt5.SetFocus
End If
End Sub

Private Sub txt5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt7.SetFocus
End If
End Sub

Private Sub txt7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt8.SetFocus
End If
End Sub

Private Sub txt8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt10.SetFocus
End If
End Sub

Private Sub txt10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt11.SetFocus
End If
End Sub

Private Sub txt11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt3 = Val(txt1) + Val(txt2)
txt6 = Val(txt4) / Val(txt5)
txt9 = Val(txt7) - Val(txt8)
txt12 = Val(txt10) * Val(txt11)
End If
End Sub

Tugas 5

Tugas 5


HASIL PERHITUNGAN DAPAT KELUAR DENGAN MENEKAN TOMBOL COMMAND HITUNG

 source code:


Private Sub cmdhitung_Click()
txt3 = Val(txt1) + Val(txt2)
txt6 = Val(txt4) / Val(txt5)
txt9 = Val(txt7) - Val(txt8)
txt12 = Val(txt10) * Val(txt11)
End Sub

Private Sub cmdbatal_Click()
txt1 = ""
txt2 = ""
txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txt9 = ""
txt10 = ""
txt11 = ""
txt12 = ""
txt1.SetFocus
End Sub

Private Sub cmdlagi_Click()
txt1 = ""
txt2 = ""
txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txt9 = ""
txt10 = ""
txt11 = ""
txt12 = ""
txt1.SetFocus
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub txt1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt2.SetFocus
End If
End Sub

Private Sub txt2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt4.SetFocus
End If
End Sub

Private Sub txt4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt5.SetFocus
End If
End Sub

Private Sub txt5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt7.SetFocus
End If
End Sub

Private Sub txt7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt8.SetFocus
End If
End Sub

Private Sub txt8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt10.SetFocus
End If
End Sub

Private Sub txt10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txt11.SetFocus
End If
End Sub

Tugas Etika Profesi

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