-->

Halaman

Selasa, 12 Desember 2017

Tugas 3_7



Private Sub cmdbatal_Click()
textnama = ""
textnik = ""
textgolongan = ""
textkode = ""
textstatus = ""
texttahun = ""
textjabatan = ""
textbagian = ""
textgaji = ""
texttunjangan = ""
texttotal = ""
textnama.SetFocus
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
textnama = ""
textnik = ""
textgolongan = ""
textkode = ""
textstatus = ""
texttahun = ""
textjabatan = ""
textbagian = ""
textgaji = ""
texttunjangan = ""
texttotal = ""
textnama.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim S As String
texttahun = Left(textnik, 4)
S = Mid(textnik, 5, 1)
If S = "A" Then
textgolongan = "A"
textjabatan = "Manajer"
textgaji = "4000000"
texttunjangan = "1025000"
ElseIf S = "B" Then
textgolongan = "B"
textjabatan = "Ka. Seksi"
textgaji = "3500000"
texttunjangan = "975000"
ElseIf S = "C" Then
textgolongan = "C"
textjabatan = "Staff"
textgaji = "3000000"
texttunjangan = "925000"
End If
S = Mid(textnik, 7, 1)
If S = "S" Then
textkode = "S"
textstatus = "Single"
ElseIf S = "M" Then
textkode = "M"
textstatus = "Menikah"
ElseIf S = "J" Then
textkode = "J"
textstatus = "Janda"
ElseIf S = "D" Then
textkode = "D"
textstatus = "Duda"
End If
S = Right(textnik, 3)
If S = "KEU" Then
textbagian = "Accounting"
ElseIf S = "ADM" Then
textbagian = "Administrasi"
ElseIf S = "SDM" Then
textbagian = "General Affair"
ElseIf S = "EDP" Then
textbagian = "IT Unit"
ElseIf S = "SPM" Then
textbagian = "Security"
End If
texttotal = Val(textgaji) + Val(texttunjangan)
End Sub

tugas 3_6



Private Sub cmdbatal_Click()
textcode = ""
textjudul = ""
textpengarang = ""
textterbit = ""
textpenerbit = ""
textharga = ""
textcode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim A As String
A = Left(textcode, 3)
If A = "SIM" Then
textjudul = "Sistem Informasi Manajemen"
textpengarang = "Fadiya Ulfa"
textharga = "75900"
ElseIf A = "EDP" Then
textjudul = "Elektronik Data Processing"
textpengarang = "Nurul Agustina"
textharga = "62000"
ElseIf A = "MNJ" Then
textjudul = "Manajemen"
textpengarang = "Rian Hidayat"
textharga = "42000"
ElseIf A = "CDR" Then
textjudul = "Corel Draw"
textpengarang = "Siti Nur Khotimah"
textharga = "53000"
ElseIf A = "RPL" Then
textjudul = "Rekayasa Perangkat Lunak"
textpengarang = "Winda Erlianti"
textharga = "83000"
End If
textterbit = "20" & Mid(textcode, 5, 2)
A = Right(textcode, 1)
If A = "A" Then
textpenerbit = "Andi Offset Yogyakarta"
ElseIf A = "I" Then
textpenerbit = "Indah Surabaya"
ElseIf A = "S" Then
textpenerbit = "Salemba Empat"
ElseIf A = "E" Then
textpenerbit = "Elek Media Komputindo"
ElseIf A = "M" Then
textpenerbit = "Maxicom"
End If
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
textcode = ""
textjudul = ""
textpengarang = ""
textterbit = ""
textpenerbit = ""
textharga = ""
textcode.SetFocus
End Sub

tugas 3_5



Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
textkode = ""
textharga = ""
textjenis = ""
textjb = ""
textjumlah = ""
texttotal = ""
textkode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim B As String
B = Left(textkode, 3)
If B = "BIM" Then
textharga = "50000"
textjenis = "BIMA"
textjb = "16.00"
ElseIf B = "EKO" Then
textharga = "35000"
textjenis = "EKONOMI"
textjb = "19.00"
ElseIf B = "MUT" Then
textharga = "23000"
textjenis = "MUTIARA"
textjb = "17.00"
ElseIf B = "SEN" Then
textharga = "15000"
textjenis = "SENJA"
textjb = "20.00"
End If
textjumlah.SetFocus
End Sub

Private Sub textjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
texttotal = Val(textharga) * Val(textjumlah)
End If
End Sub

tugas 3_4



Private Sub cmdbatal_Click()
textcode = ""
textjudul = ""
textpengarang = ""
textterbit = ""
textpenerbit = ""
textharga = ""
textcode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim A As String
A = Left(textcode, 3)
If A = "SIM" Then
textjudul = "Sistem Informasi Manajemen"
textpengarang = "Fadiya Ulfa"
textharga = "75900"
ElseIf A = "EDP" Then
textjudul = "Elektronik Data Processing"
textpengarang = "Nurul Agustina"
textharga = "62000"
ElseIf A = "MNJ" Then
textjudul = "Manajemen"
textpengarang = "Rian Hidayat"
textharga = "42000"
ElseIf A = "CDR" Then
textjudul = "Corel Draw"
textpengarang = "Siti Nur Khotimah"
textharga = "53000"
ElseIf A = "RPL" Then
textjudul = "Rekayasa Perangkat Lunak"
textpengarang = "Winda Erlianti"
textharga = "83000"
End If
textterbit = "20" & Mid(textcode, 5, 2)
A = Right(textcode, 1)
If A = "A" Then
textpenerbit = "Andi Offset Yogyakarta"
ElseIf A = "I" Then
textpenerbit = "Indah Surabaya"
ElseIf A = "S" Then
textpenerbit = "Salemba Empat"
ElseIf A = "E" Then
textpenerbit = "Elek Media Komputindo"
ElseIf A = "M" Then
textpenerbit = "Maxicom"
End If
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
textcode = ""
textjudul = ""
textpengarang = ""
textterbit = ""
textpenerbit = ""
textharga = ""
textcode.SetFocus
End Sub

Tugas 3_3

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

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

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
cbocode = ""
textmerk = ""
textsatuan = ""
textjumlahjual = ""
texthp = ""
textdis = ""
texttb = ""
cbocode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim harga, dis, total As String
harga = Val(textjumlahjual) * (textsatuan)
texthp = harga
If texthp > "140000000" Then
dis = Val(texthp) * 0.15
ElseIf texthp > "135000000" Then
dis = Val(txthp) * 0.1
ElseIf texthp > "130000000" Then
dis = Val(texthp) * 0.05
ElseIf texthp > "125000000" Then
dis = Val(texthp) * 0.02
End If
textdis = dis
texttb = Val(texthp) - Val(textdis)
End Sub

tugas 3_2

Private Sub cmdbatal_Click()
textnama = ""
textnpm = ""
textjurusan = ""
textps = ""
textmasuk = ""
texturut = ""
textnama.SetFocus
End Sub

Private Sub cmdlagi_Click()
textnama = ""
textnpm = ""
textjurusan = ""
textps = ""
textmasuk = ""
texturut = ""
textnama.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim s As String
textmasuk = "20" & Left(textnpm, 2)
s = Mid(textnpm, 3, 1)
If s = "1" Then
textjurusan = "sistem informasi"
ElseIf s = "2" Then
textjurusan = "sistem informasi"
ElseIf s = "3" Then
textjurusan = "sistem informasi"
ElseIf s = "4" Then
textjurusan = "sistem informasi"
End If
s = Mid(textnpm, 4, 2)
If s = "00" Then
textps = "strata satu"
ElseIf s = "01" Then
textps = "Diploma Tiga"
ElseIf s = "02" Then
textps = "diploma empat"
ElseIf s = "03" Then
textps = "diploma dua"
End If
texturut = Right(textnpm.Text, 3)
End Sub

Private Sub Command3_Click()
Unload Me
End Sub


Private Sub textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
textnpm.SetFocus
End If
End Sub

tugas 3_1



Private Sub cbogolongan_Click()
Dim gaji, pajak, tunjangan, terima As Variant
Select Case cbogolongan
Case "I"
gaji = 1750000
tunjangan = 175000
Case "II"
gaji = 2500000
tunjangan = 250000
Case "III"
gaji = 3250000
tunjangan = 325000
Case "IV"
gaji = 4000000
tunjangan = 400000
End Select
total = gaji + tunjangan
pajak = total * 0.1
textgaji = gaji
texttunjangan = tunjangan
textpajak = pajak
textterima = total - pajak
End Sub

Private Sub cmdbatal_Click()
textnidn = ""
textnama = ""
cbogolongan = ""
textgaji = ""
texttunjangan = ""
textpajak = ""
textterima = ""
textnidn.SetFocus
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
textnidn = ""
textnama = ""
cbogolongan = ""
textgaji = ""
texttunjangan = ""
textpajak = ""
textterima = ""
textnidn.SetFocus
End Sub

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


Private Sub textnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
textnama.SetFocus
End If
End Sub

Tugas 3_7

Private Sub cmdbatal_Click() textnama = "" textnik = "" textgolongan = "" textkode = "" texts...