tugas 4 pemrograman visual basic

TUGAS 1

01

  • Source Code

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”

End Sub

  • Source Code

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 2

02

  • 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 3

03

  • 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 4

04

  • 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 5

05

  • Source Code

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 Command2_Click()

End

End Sub

Private Sub Command3_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 Command4_Click()

Text1.SetFocus

Text1.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 Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

TUGAS 6

06

  • 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

TUGAS 7

07

  • 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 8

08

  • Source Code

Private Sub cmdbatal_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjudul.Text = “”

txtpengarang.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjudul.Text = “”

txtpengarang.Text = “”

txttahun.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub cmdproses_Click()

Dim jb, pg, pn, hg As String

txttahun.Text = “20” & Right(cbokode, 2)

s = Mid(cbokode, 3, 3)

If s = “SIM” Then

jb = “SistemInformasiManajeme”

pg = “YatiNurOktavia”

hg = “75900”

ElseIf s = “EDP” Then

jb = “ElektronikData Processing”

pg = “Imam Tarmizi”

hg = “62000”

ElseIf s = “MNJ” Then

jb = “Manajemen”

pg = “Valentina Mariana Adiwianti”

hg = “42000”

ElseIf s = “CDR” Then

jb = “Corel Draw”

pg = “RiyanSuhandi”

hg = “53000”

ElseIf s = “RPL” Then

jb = “RekayasaPerangkatLunak”

pg = “SintaUmpuSinga”

hg = “83000”

End If

txtjudul.Text = jb

txtpengarang.Text = pg

txtharga.Text = hg

s = Mid(cbokode, 1, 1)

If s = “A” Then

pn = “Andi Offset Yogyakarta”

ElseIf s = “I” Then

pn = “Indah Surabaya”

ElseIf s = “S” Then

pn = “SalembaEmpat”

ElseIf s = “E” Then

pn = “Elek Media Komputindo”

ElseIf s = “M” Then

pn = “Maxicom”

End If

txtpenerbit.Text = pn

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 9

09

  • Source Code

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

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

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 = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “3” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “4” Then

Txtprodi.Text = “Diploma Dua”

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

Private Sub Txtnpm_keypress(keyascii As Integer)

If keyascii = 13 Then

Txtjur.SetFocus

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 = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “3” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “4” Then

Txtprodi.Text = “Diploma Dua”

End If

Txtnu.Text = Right(Txtnpm.Text, 3)

End If

End Sub

TUGAS 10

10

  • Source Code

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 Form_Load()

End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

txtnpm.SetFocus

End If

End Sub

TUGAS 11

11

  • Source Code

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

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

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 = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “3” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “4” Then

Txtprodi.Text = “Diploma Dua”

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

Private Sub Txtnpm_keypress(keyascii As Integer)

If keyascii = 13 Then

Txtjur.SetFocus

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 = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “3” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “4” Then

Txtprodi.Text = “Diploma Dua”

End If

Txtnu.Text = Right(Txtnpm.Text, 3)

End If

End Sub

TUGAS 12

12

  • Source Kode

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

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

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttm.Text = “20” & Left(Txtnpm.Text, 2)

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

If S = “01” Then

Txtjur.Text = “Sistem Informasi”

ElseIf S = “02” Then

Txtjur.Text = “Manajemen Informatika”

ElseIf S = “03” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “04” Then

Txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “3” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “4” Then

Txtprodi.Text = “Diploma Dua”

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

Private Sub Txtnpm_keypress(keyascii As Integer)

If keyascii = 13 Then

Txtjur.SetFocus

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 = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

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

If S = “01” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “02” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “03” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “04” Then

Txtprodi.Text = “Diploma Dua”

End If

Txtnu.Text = Right(Txtnpm.Text, 3)

End If

End Sub

TUGAS 13

13

  • Source Code

Private Sub Cmdbatal_Click()

Txtnama.SetFocus

Txtnama.Text = “”

Txtnpm.Text = “”

Txtjur.Text = “”

Txtprodi.Text = “”

Txttm.Text = “”

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

End Sub

Private Sub Cmdproses_Click()

Dim S As String

Txttm.Text = “20” & Left(Txtnpm.Text, 2)

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

If S = “01” Then

Txtjur.Text = “Sistem Informasi”

ElseIf S = “02” Then

Txtjur.Text = “Manajemen Informatika”

ElseIf S = “03” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “04” Then

Txtjur.Text = “Komputer Akuntansi”

End If

S = Mid(Txtnpm.Text, 3, 1)

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “3” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “4” Then

Txtprodi.Text = “Diploma Dua”

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

Private Sub Txtnpm_keypress(keyascii As Integer)

If keyascii = 13 Then

Txtjur.SetFocus

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 = “Manajemen Informatika”

ElseIf S = “3” Then

Txtjur.Text = “Tehnik Informatika”

ElseIf S = “4” Then

Txtjur.Text = “Komputer Akuntansi”

End If

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

If S = “01” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “02” Then

Txtprodi.Text = “Diploma Tiga”

ElseIf S = “03” Then

Txtprodi.Text = “Diploma Empat”

ElseIf S = “04” Then

Txtprodi.Text = “Diploma Dua”

End If

Txtnu.Text = Right(Txtnpm.Text, 3)

End If

End Sub

Iklan

tugas 3 pemrograman

tugas 1

indr

  • SOURCE CODE

 

Private Sub Check1_Click()

If Check1.Value = 1 Then

Label1.FontBold = True

Else

Label1.FontBold = False

End If

End Sub

 

Private Sub Check2_Click()

If Check2.Value = 1 Then

Label1.FontItalic = True

Else

Label1.FontItalic = False

End If

End Sub

 

Private Sub Check3_Click()

If Check3.Value = 1 Then

Label1.FontUnderline = True

Else

Label1.FontUnderline = False

End If

End Sub

 

Private Sub Check4_Click()

If Check4.Value = 1 Then

Label1.FontStrikethru = True

Else

Label1.FontStrikethru = False

End If

End Sub

 

 

Private Sub Command1_Click()

Unload Me

End Sub

 

Private Sub Option1_Click()

Label1.ForeColor = vbRed

End Sub

 

Private Sub Option2_Click()

Label1.ForeColor = vbGreen

End Sub

 

Private Sub Option3_Click()

Label1.ForeColor = vbBlue

End Sub

 

Private Sub Option4_Click()

Label1.ForeColor = vbYellow

End Sub

tugas 2

iiiiiiiiiiiiiiiii

  • SOURCE CODE

Private Sub Check1_Click()

If Check1.Value = 1 Then

Label2.FontBold = True

Else

Label2.FontBold = False

End If

End Sub

Private Sub Check2_Click()

If Check1.Value = 1 Then

Label2.FontItalic = True

Else

Label2.FontItalic = False

End If

End Sub

 

Private Sub Check3_Click()

If Check1.Value = 1 Then

Label2.FontUnderline = True

Else

Label2.FontUnderline = False

End If

End Sub

Private Sub Check4_Click()

If Check1.Value = 1 Then

Label2.FontStrikethru = Value

Else

Label2.FontStrikethru = False

End If

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

Private Sub Option3_Click()

Label2.ForeColor = vbGreen

End Sub

Private Sub Option4_Click()

Label2.ForeColor = vbYellow

End Sub

tugas 3 dan 4

qqqqq

  • SOURCE CODE

Private Sub Combo1_Click()

Dim NAMA, JURUSAN, HM As String

Select Case Combo1.Text

Case “14100410”

NAMA = “INDRIANI”

JURUSAN = “SISTEM INFORMASI”

Case Is = “14100407”

NAMA = “INDAH ARIA NOVI”

JURUSAN = “SISTEM INFORMASI”

Case Is = “14100409”

NAMA = “KHARISMA RIYANTI”

JURUSAN = “SISTEM INFORMASI”

Case “14100416”

NAMA = “FATMAWATI”

JURUSAN = “SISTEM INFORMASI”

Case “14100408”

NAMA = “NIKEN MARSELIONA”

JURUSAN = “SISTEM INFORMASI”

Case “14201053”

NAMA = “RAHMAWATI”

JURUSAN = “SISTEM INFORMASI”

Case “14100427”

NAMA = “RANA ANHARI”

JURUSAN = “SISTEM INFORMASI”

Case “14100420”

NAMA = “JIMMY BERNANDO SINAGA”

JURUSAN = “SISTEM INFORMASI”

Case “14100413”

NAMA = “AGUNG TRIAWAN”

JURUSAN = “SISTEM INFORMASI”

Case “14100411”

NAMA = “OVITRIA NINGSIH”

JURUSAN = “SISTEM INFORMASI”

End Select

Text1.Text = NAMA

Text2.Text = JURUSAN

Text3.SetFocus

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Command1_Click()

Dim NA As Integer

Dim HM As String

qUIS = Val(Text3.Text)

TUGAS = Val(Text4.Text)

UTS = Val(Text5.Text)

UAS = Val(Text6.Text)

NA = (Val(Text3.Text) + Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text)) / 4

Text7.Text = NA

Select Case Text7.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

Text8.Text = HM

End Sub

 

Private Sub Command2_Click()

Combo1.SetFocus

Combo1.Text = “”

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

Text7.Text = “”

Text8.Text = “”

End Sub

Private Sub Form_Load()

Combo1.AddItem “14100410”

Combo1.AddItem “14100407”

Combo1.AddItem “14100409”

Combo1.AddItem “14100416”

Combo1.AddItem “14100408”

Combo1.AddItem “14201053”

Combo1.AddItem “14100427”

Combo1.AddItem “14100420”

Combo1.AddItem “14100413”

Combo1.AddItem “14100411”

End Sub

 

 

 

Private Sub Text3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

 

 

Private Sub Text4_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.SetFocus

End If

End Sub

tugas 5

yyyyyyy

scoure code

Private Sub Combo1_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case Combo1.Text

Case “I”

gapok = 1500000

tunjangan = 150000

Case “II”

gapok = 2000000

tunjangan = 200000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 3000000

tunjangan = 300000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

Text3.Text = gapok

Text4.Text = tunjangan

Text5.Text = pajak

Text6.Text = total – pajak

End Sub

 

 

Private Sub Command1_Click()

Text1.SetFocus

Text1.Text = “”

Text2.Text = “”

Text3.Text = “”

Text4.Text = “”

Text5.Text = “”

Text6.Text = “”

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()

Unload Me

End Sub

 

Private Sub Form_Load()

Combo1.AddItem “I”

Combo1.AddItem “II”

Combo1.AddItem “III”

Combo1.AddItem “IV”

 

 

End Sub

 

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

 

 

 

 

 

 

 

 

 

program

tugas 1

1

source code

Private Sub Command1_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
End Sub

Private Sub Command3_Click()
Unload Me
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
End Sub

tugas 2.1

2

source code

Private Sub Command1_Click()

Text3.Text = Val(Text1) * Val(Text2)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

 TUGAS 2.2

3

 source code

Private Sub Command1_Click()

Text3.Text = Val(Text1) * Val(Text2)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

TUGAS 3

source code

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

 

Private Sub Command3_Click()

Unload Me

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.Text = Val(Text1) * Val(Text2)

End If

End Sub

 

 

 

Private Sub Command1_Click()

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

Text9.Text = Val(Text7.Text) * Val(Text8.Text)

Text12.Text = Val(Text10.Text) / Val(Text11.Text)

End Sub

 

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

Text7 = “”

Text8 = “”

Text9 = “”

Text10 = “”

Text11 = “”

Text12 = “”

End Sub

 

Private Sub Command3_Click()

End

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

 

Private Sub Text10_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text11.SetFocus

End If

End Sub

Private Sub Text11_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

Text6.Text = Val(Text4.Text) * Val(Text5.Text)

Text9.Text = Val(Text7.Text) – Val(Text8.Text)

Text12.Text = Val(Text10.Text) / Val(Text11.Text)

End If

End Sub

 

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

 

Private Sub Text4_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

Text7.SetFocus

End If

End Sub

 

Private Sub Text7_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text8.SetFocus

End If

End Sub

 

Private Sub Text8_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text10.SetFocus

End If

End Sub

Tugas3.2

4

 source code

Private Sub Command1_Click()

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

Text6.Text = Val(Text4.Text) – Val(Text5.Text)

Text9.Text = Val(Text7.Text) * Val(Text8.Text)

Text12.Text = Val(Text10.Text) / Val(Text11.Text)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

Text7 = “”

Text8 = “”

Text9 = “”

Text10 = “”

Text11 = “”

Text12 = “”

End Sub

Private Sub Command3_Click()

End

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.SetFocus

End If

End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text11.SetFocus

End If

End Sub

Private Sub Text11_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text3.Text = Val(Text1.Text) + Val(Text2.Text)

Text6.Text = Val(Text4.Text) * Val(Text5.Text)

Text9.Text = Val(Text7.Text) – Val(Text8.Text)

Text12.Text = Val(Text10.Text) / Val(Text11.Text)

End If

End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text4.SetFocus

End If

End Sub

Private Sub Text4_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

Text7.SetFocus

End If

End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text8.SetFocus

End If

End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text10.SetFocus

End If

End Sub

Tugas4.1

5

source code

Private Sub Command1_Click()

Text2.Text = Val(Text1) * 0.1

Text3.Text = Val(Text1) – Val(Text2)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Command1_Click()

Text2.Text = Val(Text1) * 0.1

Text3.Text = Val(Text1) – Val(Text2)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Command1_Click()

Text2.Text = Val(Text1) * 0.1

Text3.Text = Val(Text1) – Val(Text2)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Tugas4.2

6

source code

Private Sub Command1_Click()

Text2.Text = Val(Text1) * 0.1

Text3.Text = Val(Text1) – Val(Text2)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Text2.Text = Val(Text1) * 0.1

Text3.Text = Val(Text1) – Val(Text2)

End If

End Sub

TUGAS 5.1

7

source code

Private Sub Command1_Click()

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

Private Sub Command3_Click()

End

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

End Sub

TUGAS 5.2

8

source code

Private Sub Command1_Click()

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End Sub

Private Sub Command2_Click()

Text1.SetFocus

Text1 = “”

Text2 = “”

Text3 = “”

Text4 = “”

Text5 = “”

Text6 = “”

End Sub

Private Sub Command3_Click()

End

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

End Sub

Private Sub Text3_Change()

If KeyAscii = 13 Then

Text4.Text = Val(Text1) + Val(Text2) – Val(Text3)

Text5.Text = Val(Text4) * 0.1

Text6.Text = Val(Text4) – Val(Text5)

End If

End Sub

Relakan Reus, Dortmund Bantah Ultimatum Gundogan

DORTMUND – Badai yang menaungi Borussia Dortmund terbilang belum usai. Selain prestasi yang gurem di Bundesliga, Die Borussen terancam ditinggal banyak pilar andalan mereka.

Terlepas dari posisi mereka yang masih berkubang di zona degradasi, Dortmund terus terancam ditinggal winger mereka, Marco Reus. Dari hari ke hari, spekulasi Reus pindah ke Real Madrid kian santer.

Kontrak Reus sedianya masih aktif hingga 2017 mendatang. Tapi dengan klausul pelepasan sebesar 25 juta euro, Reus diperbolehkan pergi jika ada klub yang mampu menebus angka tersebut. Bos Dortmund, Hans-Joachim Watzke mengatakan tak bisa berbuat apapun jika memang si pemain bertekad hengkang.

“Harapan besar saya adalah, dia akan bertahan untuk waktu yang lama. (Tapi) jika dia memutuskan hal berbeda (hengkang), ya mau bagaimana lagi,” tutur Watzke, seperti disadur Goal, Kamis (15/1/2015).

Tak hanya Reus. Dua pilar lainnya, Henrikh Mkhitaryan dan Ilkay Gündogan juga ramai jadi bahan perbincangan isu transfer. Khusus soal Gündogan, pemain tim nasional Jerman berdarah Turki itu sudah akan habis kontraknya 2016 mendatang.

Gündogan dituntut segera tanda tangan kontrak baru (Foto: AFP)

Sebelumnya, tersiar kabar bahwa manajemen Die Schwarzgelben menjatuhkan ultimatum dengan tujuan, agar Gündogan segera bersedia membubuhkan tanda tangannya pada proposal perpanjangan kontrak.

Kabar itu diklaim tak mendasarkan kenyataan dan dibantah Watzke,: “Tak ada ultimatum untuk Ilkay Gündogan tentang perpanjangan kontrak,” tuntasnya.

Sumber : okezone.com

Torres Belum Habis

Torres Belum Habis

Torres membuktikan dirinya belum habis, setelah mencetak sepasang gol ke gawang Madrid.(Foto: REUTERS/Sergio Perez)

MADRID – Fernando Torres menjadi bintang di duel panas Copa del Rey, Jumat (16/1/2015) dini hari tadi WIB. Pada leg kedua yang digelar di Santiago Bernabeu, penyerang Atletico Madrid itu turut mencetak sepasang gol ke gawang Real Madrid di laga yang berakhir dengan skor 2-2.

Hasil imbang ini cukup membawa Atletico tampil ke perempatfinal Copa del Rey, setelah menang agregat 4-2. Pasalnya, pada leg pertama di Vicente Calderon, Los Rojiblancos berhasil mengklaim kemenangan 2-0 (agregat 4-2).

El Nino membuka keunggulan saat pertandingan baru berjalan semenit. Memanfaatkan umpan matang Antoine Griezmann dari sektor kiri, Torres yang berdiri bebas tanpa pengawalan para pemain belakang Madrid, sukses menjebol gawang Keylor Navas.

Pemain yang dipinjam dari AC Milan itu kemudian menggandakan golnya, tak lama setelah kick off babak kedua dimulai. Lagi-lagi memanfaatkan serangan balik dan lewat kerjasama dengan Griezmann yang juga tampil menawan. Sementara dua gol Madrid hadir lewat, Sergio Ramos dan Cristiano Ronaldo.

Pelatih Diego Simeone percaya bahwa sinar Torres belum padam. Dan penampilan spektakuler kontra Madrid membungkam berbagai kritik yang belakangan tertuju kepadanya.

“Kedatangan Fernando Torres sangat baik untuk kami, meskipun sejumlah orang meragukannya. Saya sangat bahagia untuknya dan semua pendukung yang menyambutnya di Vicente Calderon,” kata Simeone, seperti dilansir Goal, Jumat (16/1/2015).

“Kami memainkan pertandingan yang hebat dan cerdas. Kami bermain melawan tim terbaik di dunia dan di babak kedua, kami melakukan pekerjaan yang sangat baik,” sambung pelatih berkebangsaan Argentina itu.

Lolosnya Atletico, praktis membuat Madrid tersingkir di ajang Copa del Rey. Los Merengues sendiri tak mampu mengalahkan rival sekota sejak mereka menang di final Liga Champions musim lalu.

“Kami memenangi La Liga musim lalu dengan melawan dua tim yang wajib memenangkan Liga Champions dan itu sangat sulit. Saya tidak menganggap Real Madrid terjebak lawan Atletico. Saya tidak berani mengatakan hal itu,” tuntasnya.

Sumber : okezone.com

Presiden Palermo Tolak Lepas Strikernya ke United

Presiden Palermo Tolak Lepas Strikernya ke United

Presiden Palermo tolak lepas strikernya ke United. (Foto: Reuters)

PALERMO – Presiden Palermo, Maurizio Zamparini, mengakui bahwa saat ini Manchester United tertarik untuk mendatangkan pemainnya, Paulo Dybala. Namun, ia menolak untuk melepas striker andalannya dalam waktu dekat.

The Red Devils belakangan memang disebut begitu tertarik dengan Dybala. Bahkan beberapa laporan menyebutkan Setan Merah telah menyiapkan tawaran kepada Palermo demi pemain internasional Argentina itu.

Namun, secara tegas Zamparini tak akan menjual strikernya itu pada bursa Januari ini. Ia mengindikasikan siap melepas pada bursa transfer musim panas mendatang.

“Dybala bernilai 40 juta euro, tapi saya tak akan menjualnya sampai Juni,” tegas Zamparini seperti dilansir The Guardian, Jumat (16/1/2015).

“Banyak klub (di luar Italia) bertanya tentangnya, termasuk Manchester United. Saya mengatakan kepada United bahwa dia tak dijual saat ini, tapi kami bisa membicarakan transfer itu enam bulan lagi,” sambungnya.

Dybala sedang menjalani musim ketiganya bersama Palermo. Pemain berusia 21 tahun itu tampil tajam sepanjang musim ini dengan mencetak sembilan gol dari 17 laga Serie-A.

Palermo mengeluarkan dana 12 juta euro saat memboyong Dybala yang masih berusia 18 tahun dari Instituto pada 2012.

Sumber : okezone.com

Ada Rumor Menyebar, Pelantikan Komjen Budi Ditunda dan Komjen Badrodin Jadi Plt Kapolri

Jakarta – Isu menyebar seputar pelantikan Komjen Budi Gunawan. Isu ini beredar lewat BlackBerry Messenger (BBM). Entah benar atau tidak, isi pesan yang menyebar itu soal isu Kapolri sementara. Isu ini sudah menyebar luas di kalangan tertentu.

Pesan berantai itu menyebar sejak pagi tadi, Jumat (16/1/2015). Isinya, ‘Breaking news: Presiden Jokow Widodo Menunda Pelantikan Komjen Budi Gunawan Sebagai Kapolri siang ini, Presiden Widodo akan menunjuk Komjen Badrodin Haiti sebagai Plt Kapolri’.

Sekali lagi belum bisa dipastikan kebenarannya soal pesan berantai ini. Penyebarnya pun belum diketahui siapa.

Tapi pagi ini Presiden Jokowi bertemu dengan Komjen Budi dan Kapolri Jenderal Sutarman di Istana. Tak tahu apa yang dibicarakan, mungkin saja terkait pelantikan Kapolri.

Sedang Kadiv Humas Mabes Polri Irjen Pol Ronny F Sompie yang dikonfirmasi perihal pelantikan dan penunjukkan Badrodin sebagai Plt Kapolri mengaku tak tahu.

“Saya nggak tahu, belum belum, belum ada,” tutur Ronn

Sumber : detiknews.com

SBY: Mari Kita Selamatkan Negara, Presiden, dan Polri

Jakarta – Presiden RI ke-6 Susilo Bambang Yudhoyono angkat bicara soal polemik calon Kapolri Komjen Budi Gunawan yang jadi tersangka. SBY menyerukan negara, Presiden, dan Polri harus diselamatkan.

“Mari kita selamatkan Negara, Presiden dan Polri,” kata SBY lewat twitter resminya, Jumat (16/1/2015).

SBY pun memberi pesan penting agar penguasa mendengarkan suara rakyat. Suara rakyat saat ini kencang menolak pelantikan Komjen Budi jadi Kapolri.

“Dengarkan suara rakyat,” imbau Ketua Umum Partai Demokrat ini.

Partai Demokrat sendiri menegaskan sikap menolak Komjen Budi jadi Kapolri. PD tak mengikuti fit and proper test Komjen Budi di Komisi III DPR dan mendesak DPR menunda pengesahan persetujuan Komjen Budi jadi Kapolri. Namun karena minoritas, PD kini tak bisa mengubah keputusan kontroversial DPR tersebut.

PD berharap Presiden Jokowi menunda pelantikan Komjen Budi Gunawan jadi Kapolri sampai proses hukumnya jelas. Sementara itu PD menyarankan masa jabatan Jenderal Sutarman sebagai Kapolri diteruskan sementara menunggu proses hukum Komjen Budi tuntas dan clear.

Sumber : detiknews.com

Ngerinya Narkoba: Polisi Ini Nyaris Gila, Hakim Madat Dipecat

Hakim Puji (rachman/detikcom)

Jakarta – Bahaya narkoba selain merusak kesehatan yang berujung kematian, juga merusak harga diri dan martabat orang. Mereka membeli narkoba itu dari jaringan kartel narkotika internasinal. Lalu, masihkah ada maaf bagi para pengedar narkoba?

Dalam catatan detikcom, Jumat (16/1/2015), narkoba tidak hanya menyerang masyarakat biasa, tetapi juga aparat penegak hukum. Seperti seorang anggota polisi di Pekanbaru, Riau, Bripka WHS yang mengonsumsi narkoba jenis sabu dan menjadi depresi dan mengarah ke gila. Di bawah pengaruh sabu, Bripka Bripka WHS berdiri di tengah jalan, di sekitar rumah dinas Wali Kota Pekanbaru Jl A Yani Pekanbaru pada 22 Desember 2014. Ia mengganggu aktivitas lalu lintas dengan cara mematahkan kaca spion mobil

Bripka WHS lalu ditangkap warga karena dianggap meresahkan. Ia kemudian diserahkan ke Polresta Pekanbaru. Berdasarkan tes urine, ia positif narkoba.

“Anggota itu positif menggunakan narkoba jenis sabu. Dari keterangan rumah sakit, ada kesimpulan agar anggota kita ini harus dirujuk ke rumah sakit jiwa. Jadi anggota kita terpaksa harus dirawat di RS Jiwa,” kata Kabid Propram Polda Riau, AKBP Budi Santoso.

Beda di Pekanbaru, beda pula di Jakarta. Bipda Jicky Vay Gumerung ditemukan tewas akibat overdosis narkoba di Diskotik Stadium, pada 16 Mei 2014. Buntutnya, Stadium lalu ditutup aktivitasnya oleh Pemprov DKI Jakarta.

Bahaya narkoba juga telah merasuk ke dalam sendi-sendi pengadilan. Hakim Puji Wijayanto digerebek BNN di Illegal Hotel saat tengah pesta narkoba dengan temannya dan para wanita pada 16 Oktober 2012. BNN mendapati puluhan butir ekstasi di room tersebut. Atas perbuatannya, Puji dijatuhi hukuman 2 tahun penjara dan dipecat dari korps hakim.

Mereka adalah contoh-contoh korban narkoba yang narkobanya diproduksi oleh kartel narkotika internasional. Lantas, masihkah kita memberikan ampun bagi para mafia narkotika?

“Tidak ada maaf bagi para pengedar narkotika,” kata Jaksa Agung M. Prasetyo dalam jumpa pers khusus mengumumkan eksekusi mati di Kejaksaan Agung, Jl Sultan Hasanuddin, Jakarta Selatan, (15/1) kemarin.

Sumber : detiknews.com

Kasus Pencucian Uang Wawan, KPK Panggil Irwansyah Lag

Jakarta – Penyidik KPK kembali melayangkan panggilan terhadap aktor, Irwansyah. Irwansyah dipanggil untuk menjalani pemeriksaan lanjutan terkait kasus Tindak Pidana Pencucian Uang (TPPU) dengan tersangka Tubagus Chaery Wardhana alias Wawan.

Dalam agenda pemeriksaan, Jumat (16/1/2015), nama Irwansyah tertulis sebagai saksi untuk Wawan.

“Benar ada panggilan untuk aktor Irwansyah, diperiksa terkait kasus TPPU TCW,” kata Kabag Pemberitaan KPK, Priharsa Nugraha saat dikonfirmasi.

Hingga pukul 10.15 WIB, Irwansyah belum terlihat tiba di gedung KPK. Belum didapatkan informasi apakah Irwansyah akan memenuhi panggilan KPK atau tidak.

Untuk diketahui, ini merupakan pemeriksaan kedua untuk Irwansyah di kasus yang sama. Irwansyah diperiksa karena pernah menjalin kerjasama bisnis dengan Wawan.

Sumber : detiknews.com