TUGAS 4 PROGRAM 2

RUMUS PROGRAM 2

Private Sub cbokode_Click()

Dim jk, hs, HB As Integer

Select Case cbokode.Text

Case “P205”

jk = “Pentium II 500 Mega Hz”

hs = “1500000”

Case “P308”

jk = “Pentium III 800 Mega Hz”

hs = “2100000”

Case “P310”

jk = “Pentium III 1.0 Giga Hz”

hs = “3500000”

Case “P415”

jk = “Pentium IV 1.5 Giga Hz”

hs = “4000000”

Case “P417”

jk = “Pentium IV 1.7 Giga Hz”

hs = “4200000”

Case “P419”

jk = “Pentium IV 1.9 Giga Hz”

hs = “5500000”

End Select

txtjenis.Text = jk

txtharga.Text = hs

txtjumlah.SetFocus

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

cbokode.SetFocus

cbokode.Text = “”

txtjenis.Text = “”

txtharga.Text = “”

txtjumlah.Text = “”

txtharpen.Text = “”

txtdiskon.Text = “”

txtbayar.Text = “”

End Sub

Private Sub cmdproses_Click()

txtharpen.Text = Val(txtharga) * Val(txtjumlah)

Select Case txtharpen.Text

Case Is > 30000000

txtdiskon.Text = Val(txtharpen) * 0.15

Case Is > 25000000

txtdiskon.Text = Val(txtharpen) * 0.1

Case Is > 20000000

txtdiskon.Text = Val(txtharpen) * 0.05

Case Is > 15000000

txtdiskon.Text = Val(txtharpen) * 0.02

End Select

txtbayar.Text = Val(txtharpen) – Val(txtdiskon)

End Sub

Private Sub Form_Load()

cbokode.AddItem “P205”

cbokode.AddItem “P308”

cbokode.AddItem “P310”

cbokode.AddItem “P415”

cbokode.AddItem “P417”

cbokode.AddItem “P419”

End Sub

Iklan

TUGAS 4 PROGRAM 14

RUMUS PROGRAM 14
Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Txtmnk.SetFocus
Txtmnk.Text = “”
Txtmn.Text = “”
Txtg.Text = “”
Txtks.Text = “”
Txts.Text = “”
Txtt.Text = “”
Txtj.Text = “”
Txtb.Text = “”
Txtgp.Text = “”
Txttn.Text = “”
Txttg.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim r As String

r = Mid(Txtmn.Text, 5, 1)
If r = “A” Then
Txtg = “A”
Txtj.Text = “MANAGER”
Txtgp.Text = “4000000”
Txttn.Text = “1025000”
ElseIf r = “B” Then
Txtg.Text = “B”
Txtj.Text = “Ka.SEKSI”
Txtgp.Text = “3500000”
Txttn.Text = “975000”
ElseIf r = “C” Then
Txtg.Text = “C”
Txtj.Text = “STAFF”
Txtgp.Text = “3000000”
Txttn.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)
Txttg.Text = Val(Txtgp.Text) + Val(Txttn.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 = “”
Txtg.Text = “”
Txtks.Text = “”
Txts.Text = “”
Txtt.Text = “”
Txtj.Text = “”
Txtb.Text = “”
Txtgp.Text = “”
Txttn.Text = “”
Txttg.Text = “”
End Sub

TUGAS 4 PROGRAM 12

RUMUS PROGRAM 3
Private Sub Cmdbatal_Click()
Txtjb.SetFocus
Txtjb.Text = “”
Txtpeng.Text = “”
Txtt.Text = “”
Txtpen.Text = “”
Txthar.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End
End Sub

Private Sub cmdlagi_Click()
Txtkb.SetFocus
Txtkb.Text = “”
Txtjb.Text = “”
Txtpeng.Text = “”
Txtt.Text = “”
Txtpen.Text = “”
Txthar.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim a, b, c, d As String
Dim h As Double
Txtt.Text = “20” & Mid(Txtkb.Text, 5, 2)
a = Left(Txtkb.Text, 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 = “ELECTRONIK 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 UMPUL SINGA”
h = “83000”
End If
Txtjb.Text = b
Txtpeng.Text = c
Txthar.Text = h
d = Right(Txtkb.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 Txtkb_Change()

End Sub

TUGAS 4 PROGRAM 10

RUMUS TUGAS 10
Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtkelas.Text = “”
Txtjur.Text = “”
Txtprodi.Text = “”
Txttm.Text = “”
Txtnorut.Text = “”
Txtup.Text = “”
Txtbps.Text = “”
Txtub.Text = “”
Txtbpa.Text = “”
Txttb.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
Txtnpm.Text = “”
Txtkelas.Text = “”
Txtjur.Text = “”
Txtprodi.Text = “”
Txttm.Text = “”
Txtnorut.Text = “”
Txtup.Text = “”
Txtbps.Text = “”
Txtub.Text = “”
Txtbpa.Text = “”
Txttb.Text = “”
End Sub

Private Sub Cmdproses_Click()
Dim S As String
Txttm.Text = “20” & Mid(Txtnpm.Text, 3, 2)
Txtnorut = Mid(Txtnpm.Text, 8, 3)
S = Left(Txtnpm.Text, 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.Text, 5, 1)
If S = “1” Then
Txtjur.Text = “sistem informasi”
ElseIf S = “2” Then
Txtjur.Text = “manajemen informasi”
ElseIf S = “3” Then
Txtjur.Text = “manajemen dan komp.akuntansi”
End If
S = Mid(Txtnpm.Text, 6, 2)
If S = “01” Then
Txtprodi.Text = “strata satu”
Txtup.Text = “200000”
ElseIf S = “02” Then
Txtprodi.Text = “Diploma Tiga”
Txtup.Text = “150000”
ElseIf S = “03” Then
Txtprodi.Text = “Diploma satu”
Txtup.Text = “15000”
End If
S = (Txtkelas.Text) & (Txtprodi.Text)
If S = “Eksekutif” & “strata satu” Then
Txtbps = “1900000”
ElseIf S = “Eksekutif” & “Diploma Tiga” Then
Txtbps = “1650000”
ElseIf S = “Eksekutif” & “Diploma satu” Then
Txtbps = “1350000”
ElseIf S = “Reguler” & “strata satu” Then
Txtbps = “1500000”
ElseIf S = “Eksekutif” & “Diploma Tiga” Then
Txtbps = “1250000”
ElseIf S = “Eksekutif” & “Diploma satu” Then
Txtbps = “1250000”
End If
Txtbpa.Text = “600000”
Txttb = Val(Txtup.Text) + Val(Txtbps.Text) + Val(Txtub.Text) + Val(Txtbpa.Text)
End Sub

Private Sub Txtnama_Change()

End Sub

TUGAS 4 PROGRAM 8

RUMUS 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()
Txtjt.SetFocus
Txtkt.Text = Left(Txtkt.Text, 3)
If Txtkt.Text = “BIM” Then
Txtjk.Text = “BIMA”
Txtht.Text = “50000”
Txtjb.Text = “16.00”
ElseIf Txtkt.Text = “EKO” Then
Txtjk.Text = “EKONOMI”
Txtht.Text = “35000”
Txtjb.Text = “19.00”
ElseIf Txtkt.Text = “MUT” Then
Txtjk.Text = “MUTIARA”
Txtht.Text = “23000”
Txtjb.Text = “17.00”
ElseIf Txtkt.Text = “SEN” Then
Txtjk.Text = “SENJA”
Txtht.Text = “15000”
Txtjb.Text = “20.00”
End If
Txttotalp.Text = Val(Txtht.Text) * Val(Txtjt.Text)
End Sub

Private Sub Form_Activate()
Txtkt.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

Private Sub Txtkt_Change()

End Sub

TUGAS 2 PROGRAM 3

RUMUS PROGRAM 3
Private Sub Cmdbatal_Click()
Txtjb.SetFocus
Txtjb.Text = “”
Txtpeng.Text = “”
Txtt.Text = “”
Txtpen.Text = “”
Txthar.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End
End Sub

Private Sub cmdlagi_Click()
Txtkb.SetFocus
Txtkb.Text = “”
Txtjb.Text = “”
Txtpeng.Text = “”
Txtt.Text = “”
Txtpen.Text = “”
Txthar.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim a, b, c, d As String
Dim h As Double
Txtt.Text = “20” & Mid(Txtkb.Text, 5, 2)
a = Left(Txtkb.Text, 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 = “ELECTRONIK 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 UMPUL SINGA”
h = “83000”
End If
Txtjb.Text = b
Txtpeng.Text = c
Txthar.Text = h
d = Right(Txtkb.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 Txtkb_Change()

End Sub

tugas 4

Private Sub cbogolongan_Click()

Dim gapok, tunjangan, pajak, total As Variant

Select Case cbogolongan.Text

Case “I”

gapok = 1000000

tunjangan = 100000

Case “II”

gapok = 3000000

tunjangan = 300000

Case “III”

gapok = 4000000

tunjangan = 400000

Case “IV”

gapok = 5000000

tunjangan = 500000

Case Else

gapok = 0

tunjangan = O

End Select

total = gapok + tunjangan

pajak = total * 0.1

txtgapok.Text = gapok

txttunjangan.Text = tunjangan

txtpajak.Text = pajak

txttotal.Text = total – pajak

End Sub

Private Sub Command1_Click()

Txtnidn.SetFocus

Txtnidn.Text = “”

Txtnama.Text = “”

cbogolongan.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txtpajak.Text = “”

txttotal.Text = “”

End Sub

Private Sub Command2_Click()

Txtnidn.SetFocus

Txtnidn.Text = “”

Txtnama.Text = “”

cbogolongan.Text = “”

txtgapok.Text = “”

txttunjangan.Text = “”

txtpajak.Text = “”

txttotal.Text = “”

End Sub

Private Sub Command3_Click()

End

End Sub

Private Sub Form_Load()

cbogolongan.AddItem “I”

cbogolongan.AddItem “II”

cbogolongan.AddItem “III”

cbogolongan.AddItem “IV”

End Sub