tugas 1

TUGAS 1

Private Sub cmdbatal_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdKeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdproses_Click()

Dim ps, jr As String

Text3 = jr

Text4 = ps

Text5 = “20” & Left(Text2, 2)

Text6 = Right(Text2, 3)

 

ps = Mid(Text2, 4, 2)

If ps = “01” Then

Text4 = “Strata Satu”

ElseIf ps = “02” Then

Text4 = “Diploma Empat”

ElseIf ps = “03” Then

Text4 = “Diploma Tiga”

ElseIf ps = “04” Then

Text4 = “Diploma Dua”

End If

 

jr = Mid(Text2, 3, 1)

If jr = “1” Then

Text3 = “Sistem Informasi”

ElseIf jr = “2” Then

Text3 = “Tehnik Informatika”

ElseIf jr = “3” Then

Text3 = “Manajemen Informatika”

ElseIf jr = “4” Then

Text3 = “Komputer Akuntansi”

End If

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text1.SetFocus

End If

End Sub

Iklan

tugas1.2

TUGAS 2

Private Sub cmdbatal_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdKeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdproses_Click()

Dim ps, jr As String

Text3 = jr

Text4 = ps

Text5 = “20” & Left(Text2, 2)

Text6 = Right(Text2, 3)

 

ps = Mid(Text2, 4, 2)

If ps = “01” Then

Text4 = “Strata Satu”

ElseIf ps = “02” Then

Text4 = “Diploma Empat”

ElseIf ps = “03” Then

Text4 = “Diploma Tiga”

ElseIf ps = “04” Then

Text4 = “Diploma Dua”

End If

 

jr = Mid(Text2, 3, 1)

If jr = “1” Then

Text3 = “Sistem Informasi”

ElseIf jr = “2” Then

Text3 = “Diploma Empat”

ElseIf jr = “3” Then

Text3 = “Diploma Tiga”

ElseIf jr = “4” Then

Text3 = “Diploma Dua”

End If

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text3.SetFocus

End If

Dim ps, jr As String

Text3 = jr

Text4 = ps

Text5 = “20” & Left(Text2, 2)

Text6 = Right(Text2, 3)

 

ps = Mid(Text2, 4, 2)

If ps = “01” Then

Text4 = “Strata Satu”

ElseIf ps = “02” Then

Text4 = “Diploma Empat”

ElseIf ps = “03” Then

Text4 = “Diploma Tiga”

ElseIf ps = “04” Then

Text4 = “Diploma Dua”

End If

 

jr = Mid(Text2, 3, 1)

If jr = “1” Then

Text3 = “Sistem Informasi”

ElseIf jr = “2” Then

Text3 = “Teknik Informatika”

ElseIf jr = “3” Then

Text3 = “Manajemen Informatika”

ElseIf jr = “4” Then

Text3 = “Komputer Akuntansi”

End If

End Sub

tugas1.3

TUGAS 3

Private Sub cmdbatal_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdKeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdproses_Click()

Dim ps, jr As String

Text3 = jr

Text4 = ps

Text5 = “20” & Left(Text2, 2)

Text6 = Right(Text2, 3)

ps = Mid(Text2, 4, 2)

jr = Mid(Text2, 3, 1)

 

If jr = “1” Then

Text3 = “Sistem Informasi”

Text4 = “Strata Satu”

ElseIf jr = “2” Then

Text3 = “Manajemen Informatika”

Text4 = “Diploma Tiga”

End If

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

Tugas 1.4

TUGAS 4

Private Sub cmdbatal_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdKeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

 

Private Sub cmdproses_Click()

Dim ps, jr As String

Text3 = jr

Text4 = ps

Text5 = “20” & Left(Text2, 2)

Text6 = Right(Text2, 3)

ps = Mid(Text2, 4, 2)

jr = Mid(Text2, 3, 1)

 

If jr = “1” Then

Text3 = “Sistem Informasi”

Text4 = “Strata Satu”

ElseIf jr = “2” Then

Text3 = “Manajemen Informatika”

Text4 = “Diploma Tiga”

End If

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text3.SetFocus

End If

Dim ps, jr As String

Text3 = jr

Text4 = ps

Text5 = “20” & Left(Text2, 2)

Text6 = Right(Text2, 3)

ps = Mid(Text2, 4, 2)

jr = Mid(Text2, 3, 1)

 

If jr = “1” Then

Text3 = “Sistem Informasi”

Text4 = “Strata Satu”

ElseIf jr = “2” Then

Text3 = “Manajemen Informatika”

Text4 = “Diploma Tiga”

End If

End Sub

Tugas 5

TUGAS 5

Private Sub cbokode_Click()

Dim hs, merk As String

Select Case cbokode.Text

Case “Apple MC965”

merk = “Apple MacBook Air MC965”

hs = “12800000”

Case “Apple MC966”

merk = “Apple MacBook Air MC966”

hs = “15800000”

Case “Apple MC968”

merk = “Apple MacBook Air MC968”

hs = “9900000”

Case “Apple MC969”

merk = “Apple MacBook Air MC969”

hs = “11900000”

Case “Apple MC700”

merk = “Apple MacBook Pro MC700”

hs = “10800000”

Case “Apple MC721”

merk = “Apple MacBook Pro MC721”

hs = “15900000”

Case “Apple MC723”

merk = “Apple MacBook Pro MC723”

hs = “19300000”

Case “Apple MC724”

merk = “Apple MacBook Pro MC724”

hs = “13700000”

Case “Apple MC311”

merk = “Apple MacBook Pro MC311”

hs = “24200000”

Case “Apple MC314”

merk = “Apple MacBook Pro MC314”

hs = “14700000”

Case “Apple MC318”

merk = “Apple MacBook Pro MC318”

hs = “17600000”

Case “Apple MC322”

merk = “Apple MacBook Pro MC322”

hs = “21300000”

Case “Apple MC965”

merk = “Apple MacBook Air MC965”

hs = “12800000”

Case “Apple MC966”

merk = “Apple MacBook Air MC966”

End Select

txtmerk.Text = merk

txths.Text = hs

txtjj.SetFocus

End Sub

 

Private Sub cmdhitunglagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtmerk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txttb.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 > 140000000 Then

txtdis.Text = Val(txthp.Text) * 0.15

ElseIf txthp.Text > 135000000 Then

txtdis.Text = Val(txthp.Text) * 0.1

ElseIf txthp.Text > 130000000 Then

txtdis.Text = Val(txthp.Text) * 0.05

ElseIf txthp.Text > 125000000 Then

txtdis.Text = Val(txthp.Text) * 0.02

End If

txttb.Text = Val(txthp.Text) – Val(txtdis.Text)

End Sub

 

Private Sub Form_Load()

cbokode.AddItem “Apple MC965”

cbokode.AddItem “Apple MC966”

cbokode.AddItem “Apple MC968”

cbokode.AddItem “Apple MC969”

cbokode.AddItem “Apple MC700”

cbokode.AddItem “Apple MC721”

cbokode.AddItem “Apple MC723”

cbokode.AddItem “Apple MC724”

cbokode.AddItem “Apple MD311”

cbokode.AddItem “Apple MD313”

cbokode.AddItem “Apple MD314”

cbokode.AddItem “Apple MC418”

cbokode.AddItem “Apple MD322”

cbokode.AddItem “Apple MC965”

cbokode.AddItem “Apple MC966”

End Sub

 

Tugas 6

TUGAS 6

Private Sub cmdhitung_Click()

cboKK.SetFocus

cboKK.Text = “”

txtjk.Text = “”

txths.Text = “”

txtjj.Text = “”

txthp.Text = “”

txtdis.Text = “”

txthb.Text = “”

End Sub

Private Sub cmdclose_Click()

End

End Sub

Private Sub cmdproses_Click()

txthp = Val(txths.Text) * Val(txtjj.Text)

Select Case txthp.Text

Case Is > 40000000

Discount = Val(txthp.Text) * 0.15

Case Is > 35000000

Discount = Val(txthp.Text) * 0.1

Case Is > 300000000

Discount = Val(txthp.Text) * 0.05

Case Is > 250000000

Discount = Val(txthp.Text) * 0.02

End Select

txtdis.Text = Discount

txthb.Text = Val(txthp.Text) – Val(txtdis.Text)

End Sub

Private Sub Form_Load()

cboKK.AddItem “P205”

cboKK.AddItem “P308”

cboKK.AddItem “P310”

cboKK.AddItem “P415”

cboKK.AddItem “P417”

cboKK.AddItem “P419”

End Sub

Private Sub cboKK_Click()

Dim JenisKomputer, HargaSatuan As String

Select Case cboKK.Text

Case “P205”

JenisKomputer = “Pentium II 500 Mega Hz”

HargaSatuan = “1500000”

Case “P308”

JenisKomputer = “Pentium III 800 Mega Hz”

HargaSatuan = “2100000”

Case “P310”

JenisKomputer = “Pentium III 1.0 Giga Hz”

HargaSatuan = “3500000”

Case “P415”

JenisKomputer = “Pentium IV 1.5 Giga Hz”

HargaSatuan = “4000000”

Case “P417”

JenisKomputer = “Pentium IV   1.7 Giga Hz ”

HargaSatuan = “4200000”

Case “P419”

JenisKomputer = “Pentium IV 1.9 Giga Hz ”

HargaSatuan = “5500000”

End Select

txtjk.Text = JenisKomputer

txths.Text = HargaSatuan

txtjj.SetFocus

End Sub

Tugas 7

TUGAS 7

Private Sub cmdproses_Click()

Dim A As String

A = Mid(cbokode, 3, 3)

If A = “SIM” Then

judul = “Sistem Informasi Manajemen”

pengarang = “Yati Nur Oktavia”

harga = “75900”

ElseIf A = “EDP” Then

judul = “Elektronik Data Procesing”

pengarang = “Imam Tarmizi”

harga = “62000”

ElseIf A = “MNJ” Then

judul = “Manajemen”

pengarang = “Valentina Mariana Adiwinanti”

harga = “42000”

ElseIf A = “CDR” Then

judul = “Corel Draw”

pengarang = “Riyan Suhandi”

harga = “53000”

ElseIf A = “RPL” Then

judul = “Rekayasa Perangkat Lunak”

pengarang = “Sinta Umpu Singa”

harga = “83000”

End If

txtjudul.Text = judul

txtpengarang.Text = pengarang

txtharga.Text = harga

A = Left(cbokode, 1)

If A = “A” Then

penerbit = “Andi Offset Yogyakarta”

ElseIf A = “I” Then

penerbit = “Indah Surabaya”

ElseIf A = “S” Then

penerbit = “Salemba Emapt”

ElseIf A = “E” Then

penerbit = “Elek Media Komputimdo”

ElseIf A = “M” Then

penerbit = “Maxicom”

End If

txtpenerbit.Text = penerbit

txttahun.Text = “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-04”

End Sub

 

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode = “”

txtjudul = “”

txtpengarang = “”

txttahun = “”

txtpenerbit = “”

txtharga = “”

End Sub

Private Sub cmdbatal_Click()

cbokode.SetFocus

cbokode = “”

txtjudul = “”

txtpengarang = “”

txttahun = “”

txtpenerbit = “”

txtharga = “”

End Sub

Private Sub cmdkeluar_Click()

Unload Me

End Sub

Tugas 8

TUGAS 8

Private Sub cmdkeluar_Click()

End

End Sub

 

Private Sub cmdlagi_Click()

txtkt.SetFocus

txtkt.Text = “”

txtht.Text = “”

txtjk.Text = “”

txtjb.Text = “”

txtjt.Text = “”

txttotalp.Text = “”

End Sub

 

Private Sub cmdproses_Click()

Dim kt, jk, jb As String

Dim ht As Currency

kt = Left(txtkt.Text, 3)

If kt = “BIM” Then

ht = “50000”

jk = “BIMA”

jb = “16.00”

ElseIf kt = “EKO” Then

ht = “35000”

jk = “EKONOMI”

jb = “19.00”

ElseIf kt = “MUT” Then

ht = “23000”

jk = “MUTIARA”

jb = “17.00”

ElseIf kt = “SEN” Then

ht = “15000”

jk = “SENJA”

jb = “20.00”

End If

txtht.Text = ht

txtjk.Text = jk

txtjb.Text = jb

txtjt.Text = jt

txtjt.SetFocus

End Sub

 

Private Sub txtjt_keypress(keyascii As Integer)

If keyascii = 13 Then

txttotalp.Text = Val(txtht.Text) * Val(txtjt.Text)

End If

End Sub

Tugas 9

TUGAS 9

Private Sub Command1_Click()

Dim K, J, P, H, G As String

K = Left(text1.Text, 3)

If K = “SIM” Or K = “sim” Then

J = “Sistem Informasi Manajemen”

P = “Fadiya Ulfa”

H = “75900”

ElseIf K = “EDP” Or K = “edp” Then

J = “Elektronik Data Procesing”

P = “Nurul Agustina”

H = “62000”

ElseIf K = “MNJ” Or K = “mnj” Then

J = “Manajemen”

P = “Rian Hidayat”

H = “42000”

ElseIf K = “cdr” Or K = “CDR” Then

J = “Corel Draw”

P = “Siti Nur Khotimah”

H = “53000”

ElseIf K = “rpl” Or K = “RPL” Then

J = “Rekayasa Perangkat Lunak”

P = “Winda Erlianti”

H = “83000”

End If

text2.Text = J

text3.Text = P

text6.Text = H

K = Right(text1.Text, 1)

If K = “A” Or K = “a” Then

G = “Andi Offset Yogyakarta”

ElseIf K = “i” Or K = “I” Then

G = “Indah Surabaya”

ElseIf K = “S” Or K = “s” Then

G = “Salemba Empat”

ElseIf K = “E” Or K = “e” Then

G = “Elek Media Komputindo”

ElseIf K = “M” Or K = “m” Then

G = “maxicom”

End If

text5.Text = G

text4.Text = “20” & Mid(text1.Text, 4, 2)

End Sub

Private Sub Command2_Click()

text1.SetFocus

text1 = “”

text2 = “”

text3 = “”

text4 = “”

text5 = “”

text6 = “”

End Sub

Private Sub Command3_Click()

text1.SetFocus

text1 = “”

text2 = “”

text3 = “”

text4 = “”

text5 = “”

text6 = “”

End Sub

Private Sub Command4_Click()

Unload Me

End Sub

Tugas 10

TUGAS 10

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtps.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 = “”

txtjurusan.Text = “”

txtps.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

txtjurusan.Text = “Sistem Informasi”

ElseIf S = “2” Then

txtjurusan.Text = “Teknik Informatika”

ElseIf S = “3” Then

txtjurusan.Text = “Manajemen Informatika”

ElseIf S = “4” Then

txtjurusan.Text = “Manajemen & Komp. Akuntansi”

End If

S = Mid(txtnpm.Text, 4, 2)

If S = “00” Then

txtps.Text = “Strata Satu”

txtbp.Text = “1950000”

ElseIf S = “01” Then

txtps.Text = “Diploma Empat”

txtbp.Text = “1750000”

ElseIf S = “02” Then

txtps.Text = “Diploma Tiga”

txtbp.Text = “1650000”

ElseIf S = “03” Then

txtps.Text = “Diploma Dua”

txtbp.Text = “1450000”

End If

txtnu.Text = Right(txtnpm.Text, 3)

 

End Sub

Private Sub form_activate()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtps.Text = “”

txttm.Text = “”

txtnu.Text = “”

txtbp.Text = “”

End Sub

Private Sub txtnama_keypress(keyascii As Integer)

If keyascii = 13 Then

txtnpm.SetFocus

End If

End Sub