PROGAM 4

PROGAM 14

EMPAT BELAS

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

Advertisements

PROGAM 4

PROGAM 13

TIGA BELAS

CODE:

Private Sub Cmdbatal_Click()

txtkode.SetFocus

txtkode.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttt.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdlagi_Click()

txtkode.SetFocus

txtkode.Text = “”

txtjb.Text = “”

txtpeng.Text = “”

txttt.Text = “”

txtpenerbit.Text = “”

txtharga.Text = “”

End Sub

Private Sub Cmdproses_Click()

Dim S As String

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

S = Mid(txtkode, 3, 3)

If S = “SIM” Then

txtjb.Text = “Sistem Informasi Manajemen”

txtpeng.Text = “Andra Setiawan”

txtharga.Text = “75900”

ElseIf S = “EDP” Then

txtjb.Text = “Elektronik Data Processing”

txtpeng.Text = “Desi Istiqomah”

txtharga.Text = “62000”

ElseIf S = “MNJ” Then

txtjb.Text = “Manajemen”

txtpeng.Text = “Sandy Fitra jaya”

txtharga.Text = “42000”

ElseIf S = “CDR” Then

txtjb.Text = “Corel Draw”

txtpeng.Text = “Tri Indah Sari”

txtharga.Text = “53000”

ElseIf S = “RPL” Then

txtjb.Text = “Rekayasa Perangkat Lunak”

txtpeng.Text = “Ernita Sari”

txtharga.Text = “83000”

End If

S = Left(txtkode, 1)

If S = “A” Then

txtpenerbit.Text = “Andi Offset Yogyakarta”

ElseIf S = “I” Then

txtpenerbit.Text = “Indah Surabaya”

ElseIf S = “S” Then

txtpenerbit.Text = “Salemba Empat”

ElseIf S = “E” Then

txtpenerbit.Text = “Elek Media Komputindo”

ElseIf S = “M” Then

txtpenerbit.Text = “Maxicom”

End If

End Sub

PROGAM 4

PROGAM 12

DUA BELAS

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

PROGAM 4

PROGAM 11

SEBELAS

CODE:

Private Sub Command1_Click()

Dim S As String

Texttm.Text = “20” & Left(Textnpm.Text, 2)

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

If S = “1” Then

Textjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

Textjur.Text = “Teknik Informatika”

ElseIf S = “3” Then

Textjur.Text = “Manajemen Informatika”

ElseIf S = “4” Then

Textjur.Text = “Manajemen & Komp. Akuntansi”

End If

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

If S = “00” Then

Textprodi.Text = “Strata Satu”

Textbp.Text = “1950000”

ElseIf S = “01” Then

Textprodi.Text = “Diploma Empat”

Textbp.Text = “1750000”

ElseIf S = “02” Then

Textprodi = “Diploma Tiga”

Textbp.Text = “1650000”

ElseIf S = “03” Then

Textprodi.Text = “Diploma dua”

Textbp.Text = “1450000”

End If

Textnu.Text = Right(Textnpm.Text, 3)

 

 

End Sub

 

Private Sub Command2_Click()

textnama.SetFocus

textnama.Text = “”

Textnpm.Text = “”

Textjur.Text = “”

Textprodi.Text = “”

Texttm.Text = “”

Textnu.Text = “”

Textbp.Text = “”

 

End Sub

 

Private Sub Command3_Click()

textnama.SetFocus

textnama.Text = “”

Textnpm.Text = “”

Textjur.Text = “”

Textprodi.Text = “”

Texttm.Text = “”

Textnu.Text = “”

Textbp.Text = “”

 

End Sub

 

Private Sub Command4_Click()

End

 

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnpm.SetFocus

End If

 

End Sub

 

 

TUGAS 4

PROGAM 10

SEPULUH

CODE:

Private Sub Command1_Click()

Dim S As String

Texttm.Text = “20” & Left(Textnpm.Text, 2)

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

If S = “1” Then

Textjur.Text = “Sistem Informasi”

ElseIf S = “2” Then

Textjur.Text = “Teknik Informatika”

ElseIf S = “3” Then

Textjur.Text = “Manajemen Informatika”

ElseIf S = “4” Then

Textjur.Text = “Manajemen & Komp. Akuntansi”

End If

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

If S = “00” Then

Textprodi.Text = “Strata Satu”

Textbp.Text = “1950000”

ElseIf S = “01” Then

Textprodi.Text = “Diploma Empat”

Textbp.Text = “1750000”

ElseIf S = “02” Then

Textprodi = “Diploma Tiga”

Textbp.Text = “1650000”

ElseIf S = “03” Then

Textprodi.Text = “Diploma dua”

Textbp.Text = “1450000”

End If

Textnu.Text = Right(Textnpm.Text, 3)

 

 

End Sub

 

Private Sub Command2_Click()

textnama.SetFocus

textnama.Text = “”

Textnpm.Text = “”

Textjur.Text = “”

Textprodi.Text = “”

Texttm.Text = “”

Textnu.Text = “”

Textbp.Text = “”

 

End Sub

 

Private Sub Command3_Click()

textnama.SetFocus

textnama.Text = “”

Textnpm.Text = “”

Textjur.Text = “”

Textprodi.Text = “”

Texttm.Text = “”

Textnu.Text = “”

Textbp.Text = “”

 

End Sub

 

Private Sub Command4_Click()

End

 

End Sub

 

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Textnpm.SetFocus

End If

 

End Sub

 

 

TUGAS 4

PROGAM 9

SEMBILAN

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 = “SELEMBA 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

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-01”

Combo1.AddItem “I-EDP-02”

Combo1.AddItem “S-MNJ-03”

Combo1.AddItem “E-CDR-04”

Combo1.AddItem “M-RPL-05”

 

 

End Sub

 

 

 

 

 

TUGAS 4

PROGAM 8

DELAPAN

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