6.1

abi 6

Private Sub Form_Load()
cbokode.AddItem “Asus A43SA”
cbokode.AddItem “Asus A43SD”
cbokode.AddItem “Asus A43SJ”
cbokode.AddItem “Asus A43TA”
cbokode.AddItem “Asus N43SL”
cbokode.AddItem “Apple MD311″
cbokode.AddItem “Apple MD313″
cbokode.AddItem “Apple MD313″
cbokode.AddItem “Apple MD322″
cbokode.AddItem “Apple MC965″
End Sub

Private Sub Cbokode_Click()
End Sub

Private Sub Txtjj_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txthp.SetFocus
txthp.Text = Val(txths.Text) * Val(txtjj.Text)
End If

Select Case txthp.Text
Case Is > 140000000
txtdis.Text = Val(txthp.Text) * 0.15

Case Is > 135000000
txtdis.Text = Val(txthp.Text) * 0.1

Case Is > 130000000
txtdis.Text = Val(txthp.Text) * 0.5

Case Is > 125000000
txtdis.Text = Val(txthp.Text) * 0.2
End Select

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

Private Sub CmdProses_Click()
txthp.Text = Val(txths.Text) * Val(txtjj.Text)
Select Case txthp.Text
Case Is > 140000000
txtdis.Text = Val(txthp.Text) * 0.15

Case Is > 135000000
txtdis.Text = Val(txthp.Text) * 0.1

Case Is > 130000000
txtdis.Text = Val(txthp.Text) * 0.5

Case Is > 125000000
txtdis.Text = Val(txthp.Text) * 0.2
End Select

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

Private Sub Cmdlagi_Click()
cbokode.SetFocus
txtmerk = “”
txths = “”
txtjj = “”
txthp = “”
txtdis = “”
txttb = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Advertisements

tugas 4

tugas 2.1

ABI 3.1

Private Sub Cmdbatal_Click()

kosong

End Sub

Private Sub cmdlagi_Click()

kosong

End Sub

Private Sub Form_load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

End Sub

Private Sub Cmdkeluar_Click()

Unload Me

End Sub

Private Sub cbogolongan_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case cbogolongan.Text

Case “I”

gapok = 500000

tunjangan = 50000

Case “II”

gapok = 3000000

tunjangan = 300000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 5000000

tunjangan = 300000

Case Else

gapok = 0

tunjangan = 0

End Select

total = gapok + tunjangan

pajak = total * 0.1

txtgapok.Text = gapok

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

End Sub

tugas 8.1

ABI 8.1

Private Sub Cmdlagi_Click()
txtjb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtp.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtp.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”
End Sub

Private Sub cmdproses_Click()

Dim a, b, c, d As String

Dim h As Double

txttt.Text = “20” & Right(cbokb.Text, 2)

a = Mid(cbokb.Text, 3, 3)

If a = “SIM” Then

b = “SISTEM INFORMASI MANAJEMEN”

c = “rizky kurniawan”

h = “75900”

ElseIf a = “MNJ” Then

b = “MANAJEMEN”

c = “abi kuniawan”

h = “42000”

ElseIf a = “EDP” Then

b = “ELECTRONIK DATA PROCESSING”

c = “rido sanjaya”

h = “62000”

ElseIf a = “CDR” Then

b = “COREL DRAW”

c = “yazir saputra”

h = “53000”

ElseIf a = “RPL” Then

b = “REKAYASA PERANGKAT LUNAK”

c = “mat sukri”

h = “83000”

End If

txtjb.Text = b

txtpeng.Text = c

txth.Text = h

d = Left(cbokb.Text, 1)

If d = “A” Then

txtpen.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf d = “I” Then

txtpen.Text = “INDAH SURABAYA”

ElseIf d = “M” Then

txtpen.Text = “MAXICOM”

ElseIf d = “S” Then

txtpen.Text = “SURYA PERMAI”

ElseIf d = “E” Then

txtpen.Text = “ELEK MEDIA KOMPUTINDO”

End If

End Sub

Private Sub cmdbatal_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttt.Text = “”

txtpen.Text = “”

txth.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttt.Text = “”

txtpen.Text = “”

txth.Text = “”

End Sub

Private Sub Form_Load()

cbokb.AddItem “A-SIM-01”

cbokb.AddItem “I-EDP-14”

cbokb.AddItem “S-MNJ-13”

cbokb.AddItem “E-CDR-12”

cbokb.AddItem “M-RPL-11”

End Sub

tugas 9.1

AB9

Private Sub Cmdproses_Click()
Dim A As String
A = Mid(Txtkt.Text, 1, 3)
If A = “BIM” Then
Txtht.Text = 50000
Txtjk.Text = “BIMA”
Txtjb.Text = “16.00”
ElseIf A = “EKO” Then
Txtht.Text = 35000
Txtjk.Text = “EKONOMI”
Txtjb.Text = “19.00”
ElseIf A = “MUT” Then
Txtht.Text = 23000
Txtjk.Text = “MUTIARA”
Txtjb.Text = “17.00”
ElseIf A = “SEN” Then
Txtht.Text = 15000
Txtjk.Text = “SENJA”
Txtjb.Text = “20.00”
End If
Txttotalp.Text = Val(Txtht.Text) * Val(Txtjt.Text)

End Sub

Private Sub Cmdlagi_Click()
Txtkt.SetFocus
Txtkt.Text = “”
Txtht.Text = “”
Txtjk.Text = “”
Txtjb.Text = “”
Txtjt.Text = “”
Txttotalp.Text = “”
End Sub

Private Sub Txtkt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtjt.SetFocus
End If
End Sub

Private Sub Cmdkeluar_Click()
Unload Me

tugas 10.1

ABI 10.1

Private Sub Cmdlagi_Click()
txtjb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtp.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtp.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txthg.Text = “”
End Sub

Private Sub cmdproses_Click()

Dim a, b, c, d As String

Dim h As Double

txttt.Text = “20” & Right(cbokb.Text, 2)

a = Mid(cbokb.Text, 3, 3)

If a = “SIM” Then

b = “SISTEM INFORMASI MANAJEMEN”

c = “rizky kurniawan”

h = “75900”

ElseIf a = “MNJ” Then

b = “MANAJEMEN”

c = “abi kuniawan”

h = “42000”

ElseIf a = “EDP” Then

b = “ELECTRONIK DATA PROCESSING”

c = “rido sanjaya”

h = “62000”

ElseIf a = “CDR” Then

b = “COREL DRAW”

c = “yazir saputra”

h = “53000”

ElseIf a = “RPL” Then

b = “REKAYASA PERANGKAT LUNAK”

c = “mat sukri”

h = “83000”

End If

txtjb.Text = b

txtpeng.Text = c

txth.Text = h

d = Left(cbokb.Text, 1)

If d = “A” Then

txtpen.Text = “ANDI OFFSET YOGYAKARTA”

ElseIf d = “I” Then

txtpen.Text = “INDAH SURABAYA”

ElseIf d = “M” Then

txtpen.Text = “MAXICOM”

ElseIf d = “S” Then

txtpen.Text = “SURYA PERMAI”

ElseIf d = “E” Then

txtpen.Text = “ELEK MEDIA KOMPUTINDO”

End If

End Sub

Private Sub cmdbatal_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttt.Text = “”

txtpen.Text = “”

txth.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

cbokb.SetFocus

cbokb.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttt.Text = “”

txtpen.Text = “”

txth.Text = “”

End Sub

Private Sub Form_Load()

cbokb.AddItem “A-SIM-01”

cbokb.AddItem “I-EDP-o2”

cbokb.AddItem “S-MNJ-03”

cbokb.AddItem “E-CDR-04”

cbokb.AddItem “M-RPL-05”

End Sub

ABI 2

TUGAS 3.2

Private Sub chkitalic_Click()

‘membuat teks miring

If chkitalic.Value = 1 Then

lbltext.FontItalic = True

Else

lbltext.FontItalic = False

End If

End Sub

Private Sub cmdok_Click()

lbltext.Text = Val(Text1.Text)

End Sub

Private Sub cmdselesai_Click()

End

End Sub

Private Sub optblue_Click()

‘membuat teks berwarna biru

lbltext.ForeColor = vbBlue

End Sub

Private Sub chkbold_Click()

‘membuat teks tebal

If chkbold.Value = 1 Then

lbltext.FontBold = True

Else

lbltext.FontBold = False

End If

End Sub

Private Sub optred_Click()

‘membuat teks berwarna merah

lbltext.ForeColor = vbRed

End Sub

Private Sub lbltext_Change()

lbltext.Text = Text1.Text

End Sub

ABI 3

TUGAS 2.1
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

TUGAS 2.2
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 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 Command2_Click()
Text1.SetFocus
Text1 = ” “
Text2 = ” “
Text3 = ” “
Text4 = ” “
Text5 = ” “
Text6 = ” “
End Sub

Private Sub Command3_Click()
End
End Sub

TUGAS 3

ABI 1

TUGAS 1.1
Private Sub Command1_Click()
Text2.Text = Val(Text1) * 0.1
Text3.Text = Val(Text1) – Val(Text2)
End Sub

TUGAS 1.2
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
Text2.Text = Val(Text1) * 0.1
Text3.Text = Val(Text1) – Val(Text2)
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

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

Private Sub Command3_Click()
End
End Sub

TUGAS 3

ABI 1

TUGAS 1.1
Private Sub Command1_Click()
Text2.Text = Val(Text1) * 0.1
Text3.Text = Val(Text1) – Val(Text2)
End Sub

TUGAS 1.2
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
Text2.Text = Val(Text1) * 0.1
Text3.Text = Val(Text1) – Val(Text2)
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

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

Private Sub Command3_Click()
End
End Sub

ABI 3

TUGAS 2.1
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

TUGAS 2.2
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 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 Command2_Click()
Text1.SetFocus
Text1 = ” “
Text2 = ” “
Text3 = ” “
Text4 = ” “
Text5 = ” “
Text6 = ” “
End Sub

Private Sub Command3_Click()
End
End Sub