tugas 4. program 7

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 = “00” Then

Txtjur.Text = “Sistem Informasi”

ElseIf S = “01” Then

Txtjur.Text = “Manajemen Informatika”

End If

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

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

 

End If

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

End Sub

 

Iklan

tugas 4. program 6

rumus program 6

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 = “00” Then

Txtjur.Text = “Sistem Informasi”

ElseIf S = “01” Then

Txtjur.Text = “Manajemen Informatika”

End If

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

If S = “1” Then

Txtprodi.Text = “Strata Satu”

ElseIf S = “2” Then

Txtprodi.Text = “Diploma Tiga”

 

End If

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

End Sub

 

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

 

TUGAS 4. PROGRAM 12

RUMUS PROGRAM 12

Private Sub Cbokode_Click()

Dim kk, jk, hs As String

Select Case Cbokode.Text

Case “P205”

Txtjk.Text = “Pentium II 500 Mega Hz”

Txths.Text = “1500000”

Case “P308”

Txtjk.Text = “Pentium III 800 Mega Hz”

Txths.Text = “2100000”

Case “P310”

Txtjk.Text = “Pentium III 1.0 Giga Hz”

Txths.Text = “3500000”

Case “P415”

Txtjk.Text = “Pentium IV 1.5 Giga Hz ”

Txths.Text = “4000000”

Case “P417”

Txtjk.Text = “Pentium IV 1.7 Giga Hz”

Txths.Text = “4200000”

Case “P419”

Txtjk.Text = “Pentium IV 1.9 Mega Hz”

Txths.Text = “5500000”

End Select

End Sub

 

Private Sub Cmdhitunglagi_Click()

Cbokode.SetFocus

Cbokode.Text = “”

Txtjk.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 > 40000000 Then

Txtdis.Text = Val(Txthp.Text) * 0.15

ElseIf Txthp.Text > 35000000 Then

Txtdis.Text = Val(Txthp.Text) * 0.1

ElseIf Txthp.Text > 30000000 Then

Txtdis.Text = Val(Txthp.Text) * 0.5

ElseIf Txthp.Text > 25000000 Then

Txtdis.Text = Val(Txthp.Text) * 0.2

End If

Txttb.Text = Val(Txthp.Text) – Val(Txtdis.Text)

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

TUGAS 4. PROGRAM 11

RUMUS TUGAS 11

Private Sub cmdbatal_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtstudi.Text = “”

txttahun.Text = “”

txtnurut.Text = “”

txtbp.Text = “”

txtterbilang.Text = “”

End Sub

 

Private Sub cmdkeluar_Click()

Dim testmsg As Integer

testmsg = MsgBox(“anda yakin mau keluar”, vbYesNo)

End

End Sub

 

Private Sub cmdlagi_Click()

txtnama.SetFocus

txtnama.Text = “”

txtnpm.Text = “”

txtjurusan.Text = “”

txtstudi.Text = “”

txttahun.Text = “”

txtnurut.Text = “”

txtbp.Text = “”

txtterbilang.Text = “”

End Sub

Private Sub cmdproses_Click()

Dim s As String

txttahun.Text = “20” & Mid(txtnpm.Text, 1, 2)

txtnurut = Mid(txtnpm.Text, 6, 3)

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

If s = “01” Then

txtstudi.Text = “strata satu”

txtbp.Text = “1950000”

ElseIf s = “02” Then

txtstudi.Text = “Diploma Empat”

txtbp.Text = “1750000”

ElseIf s = “03” Then

txtstudi.Text = “Diploma Tiga”

txtbp.Text = “1650000”

ElseIf s = “04” Then

txtstudi.Text = “Diploma Dua”

txtbp.Text = “1450000”

End If

s = Mid(txtnpm.Text, 3, 1)

If s = “1” Then

txtjurusan.Text = “sistem informasi”

ElseIf s = “2” Then

txtjurusan.Text = “tehnik informasi”

ElseIf s = “3” Then

txtjurusan.Text = “manajemen informasi”

ElseIf s = “4” Then

txtjurusan.Text = “manajemen dan komp.akuntansi”

End If

End Sub

 

Private Sub txtnama_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 9

RUMUS PROGRAM 9

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 = “ERNITA SARI”

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