Slide1

Private Sub cmdbatal_Click()
cbokode.SetFocus
cbokode.Text = “”
txtjudul.Text = “”
txtpengarang.Text = “”
txttahun.Text = “”
txtpenerbit.Text = “”
txtharga.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
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 a As String

a = Left(cbokode.Text, 1)
If a = “A” Then
txtpenerbit.Text = “Andi Offset Yogyakarta”
ElseIf a = “I” Then
txtpenerbit.Text = “Indah Surabaya”
ElseIf a = “S” Then
txtpenerbit.Text = “Salemba Empat”
ElseIf a = “E” Then
txtpenerbit.Text = “Elek Media Komputindo”
ElseIf a = “M” Then
txtpenerbit.Text = “Maxicom”
End If

a = Mid(cbokode.Text, 3, 3)
If kode = “SIM” Then
txtjudul.Text = “Sistem Informasi Manajemen”
txtpengarang.Text = “Yati Nur Oktavia”
txtharga.Text = “75900″
ElseIf a = “EDP” Then
txtjudul.Text = “Elektronik Data Proses”
txtpengarang.Text = “Imam Tarmizi”
txtharga.Text = “62000″
ElseIf a = “MNJ” Then
txtjudul.Text = “Manajemen”
txtpengarang.Text = “Heru susanto”
txtharga.Text = “42000″
ElseIf a = “CRD” Then
txtjudul.Text = “Corel Draw”
txtpengarang.Text = “Riyan Suhandi”
txtharga.Text = “453000″
ElseIf a = “RPL” Then
txtjudul.Text = “Rekayasa Perangkat Lunak”
txtpengarang.Text = “Sinta umpu singa”
txtharga.Text = “83000″
End If
txttahun.Text = “20″ & Right(cbokode.Text, 2)
End Sub

Private Sub Form_Load()
cbokode.AddItem “A-SIM-01″
cbokode.AddItem “I-EDP-02″
cbokode.AddItem “S-MNJ-03″
cbokode.AddItem “E-CRD-04″
cbokode.AddItem “M-RPL-05″
End Sub

Slide1

Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttt.Text = “”
txtpen.Text = “”
txthrg.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttt.Text = “”
txtpen.Text = “”
txthrg.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim s As String

s = Mid(txtkb.Text, 1, 1)
If s = “A” Then
txtpen.Text = “Andi Offset Yogyakarta”
ElseIf s = “I” Then
txtpen.Text = “Indah Surabaya”
ElseIf s = “S” Then
txtpen.Text = “Salemba Empat”
ElseIf s = “E” Then
txtpen.Text = “Elek Media Koputindo”
ElseIf s = “M” Then
txtpen.Text = “Maxicom”
End If

s = Mid(txtkb.Text, 3, 3)
If s = “SIM” Then
txtjb.Text = “Sistem Informasi Manajemen”
txtpeng.Text = “Andra Setiawan”
txthrg.Text = “75900″

ElseIf s = “EDP” Then
txtjb.Text = “Elektronik Data Procissing”
txtpeng.Text = “Desi Istiqomah”
txthrg.Text = “62000″

ElseIf s = “MNJ” Then
txtjb.Text = “Manajemen”
txtpeng.Text = “Sandy Fitrajaya”
txthrg.Text = “42000″

ElseIf s = “CDR” Then
txtjb.Text = “Corel Draw”
txtpeng.Text = “Tri Indah Sari”
txthrg.Text = “62000″

ElseIf s = “RPL” Then
txtjb.Text = “Rekayasa Prangkat Lunak”
txtpeng.Text = “Ernita”
txthrg.Text = “83000″
End If
txttt.Text = “20″ & Right(txtkb.Text, 2)
End Sub

Slide1

Private Sub cmdbatal_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttt.Text = “”
txtpen.Text = “”
txthrg.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
txtkb.SetFocus
txtkb.Text = “”
txtjb.Text = “”
txtpeng.Text = “”
txttt.Text = “”
txtpen.Text = “”
txthrg.Text = “”
End Sub

Private Sub cmdproses_Click()
Dim s As String

s = Mid(txtkb.Text, 8, 1)
If s = “A” Then
txtpen.Text = “Andi Offset Yogyakarta”
ElseIf s = “I” Then
txtpen.Text = “Indah Surabaya”
ElseIf s = “S” Then
txtpen.Text = “Salemba Empat”
ElseIf s = “E” Then
txtpen.Text = “Elek Media Koputindo”
ElseIf s = “M” Then
txtpen.Text = “Maxicom”
End If

s = Mid(txtkb.Text, 1, 3)
If s = “SIM” Then
txtjb.Text = “Sistem Informasi Manajemen”
txtpeng.Text = “Fadiyah Ulfa”
txthrg.Text = “75900″

ElseIf s = “EDP” Then
txtjb.Text = “Elektronik Data Procissing”
txtpeng.Text = “Nurul Agustina”
txthrg.Text = “62000″

ElseIf s = “MNJ” Then
txtjb.Text = “Manajemen”
txtpeng.Text = “Rian Hidayat”
txthrg.Text = “42000″

ElseIf s = “CDR” Then
txtjb.Text = “Corel Draw”
txtpeng.Text = “Siti Nur Khotimah”
txthrg.Text = “62000″

ElseIf s = “RPL” Then
txtjb.Text = “Rekayasa Prangkat Lunak”
txtpeng.Text = “Winda Erlianti”
txthrg.Text = “83000″
End If
txttt.Text = “20″ & Mid(txtkb.Text, 5, 2)
End Sub

Slide1

Private Sub Command1_click()
Dim s As String
txtth.Text = Left(Text2.Text, 4)
s = Mid(Text2.Text, 5, 1)
If s = “A” Then
txtgol.Text = “A”
txtjb.Text = “manajer”
txtgp.Text = “4000000″
txttj.Text = “1025000″
ElseIf s = “B” Then
txtgol.Text = “B”
txtjb.Text = “ka. seksi”
txtgp.Text = “3500000″
txttj.Text = “975000″
ElseIf s = “C” Then
txtgol.Text = “C”
txtjb.Text = “staf”
txtgp.Text = “3000000″
txttj.Text = “925000″
End If
s = Mid(Text2.Text, 7, 1)
If s = “s” Then
txtkod.Text = “s”
txtst.Text = “singel”
ElseIf s = “m” Then
txtkod.Text = “m”
txtst.Text = “menikah”
txtkod.Text = “j”
txtst.Text = “janda”
txtkod.Text = “d”
txtst.Text = “duda”
End If
s = Mid(Text2.Text, 9, 3)
If s = “keu” Then
txtbg.Text = “accaunting”
ElseIf s = “adm” Then
txtbg.Text = “administrasi”
ElseIf s = “sdm” Then
txtbg.Text = “general affairi”
ElseIf s = “edp” Then
txtbg.Text = “it unuit”
ElseIf s = “spm” Then
txtbg.Text = “security”
End If
txttg.Text = Val(txtgp.Text) + Val(txttj.Text)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
txtgol.Text = “”
txtkod.Text = “”
txtst.Text = “”
txtth.Text = “”
txtjb.Text = “”
txtbg.Text = “”
txtgp.Text = “”
txttj.Text = “”
txttg.Text = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
txtgol.Text = “”
txtkod.Text = “”
txtst.Text = “”
txtth.Text = “”
txtjb.Text = “”
txtbg.Text = “”
txtgp.Text = “”
txttj.Text = “”
txttg.Text = “”
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Text10_Change()

End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub

Slide1

Private Sub Cmdbatal_Click()
txtnm.SetFocus
txtnm.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttm.Text = “”
txtnu.Text = “”
End Sub

Private Sub Cmdkeluar_Click()
End
End Sub

Private Sub Cmdlagi_Click()
txtnm.SetFocus
txtnm.Text = “”
txtnpm.Text = “”
txtjur.Text = “”
txtps.Text = “”
txttm.Text = “”
txtnu.Text = “”
End Sub

Private Sub Cmdproses_Click()
Dim A, jr, ps As String
txttm.Text = “20″ & Left(txtnpm.Text, 2)
A = Mid(txtnpm.Text, 3, 1)
If “A” = “1″ Then
jr = “sistem informasi”
ElseIf A = “2″ Then
jr = “manajemen informatika”
ElseIf A = “3″ Then
jr = “teknik informatika”
ElseIf A = “4″ Then
jr = “komputer akutansi”
End If
txtjur.Text = jr
A = Mid(txtnpm.Text, 4, 2)
If A = “00″ Then
ps = “strata satu”
ElseIf A = “01″ Then
ps = “diploma empat”
ElseIf A = “02″ Then
ps = “diploma tiga”
ElseIf A = “03″ Then
ps = “diploma dua”
End If
txtps.Text = ps
txtnu.Text = Right(txtnpm.Text, 3)
End Sub

Private Sub txtnm_k()

End Sub

Private Sub txtnm_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnpm.SetFocus
End If
End Sub

Vb_praktikum 2 Tuliskan nama anda

Slide2

Private Sub Check1_Click()
Label2.FontBold = Check1.Value
End Sub

Private Sub Check2_Click()
Label2.FontItalic = Check1.Value
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

Vb_praktikum 1 Front color & front style

Slide1
Private Sub Checkbold_Click()
If Checkbold.Value = 1 Then
Label1.FontBold = True
ElseIf Checkbold.Value = 0 Then
Label1.FontBold = False
End If
End Sub

Private Sub Checkitalic_Click()
If Checkitalic.Value = 1 Then
Label1.FontItalic = True
ElseIf Checkitalic.Value = 0 Then
Label1.FontItalic = False
End If
End Sub

Private Sub Checkstrikeout_Click()
If Checkstrikeout.Value = 1 Then
Label1.FontStrikethru = True
ElseIf Checkstrikeout.Value = 0 Then
Label1.FontStrikethru = False
End If
End Sub

Private Sub Checkunderline_Click()
If Checkunderline.Value = 1 Then
Label1.FontUnderline = True
ElseIf Checkunderline.Value = 0 Then
Label1.FontUnderline = False
End If
End Sub

Private Sub Comdexit_Click()
Unload Me
End Sub

Private Sub optblue_Click()
If optblue.Value = True Then
Label1.ForeColor = vbBlue
End If
End Sub

Private Sub optgreen_Click()
If optgreen.Value = True Then
Label1.ForeColor = vbGreen
End If
End Sub

Private Sub optred_Click()
If optred.Value = True Then
Label1.ForeColor = vbRed
End If
End Sub

Private Sub optyellow_Click()
If optyellow.Value = True Then
Label1.ForeColor = vbYellow
End If
End Sub