TUGAS 4

6 Mar

Image

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdproses_Click()
Dim n, jurusan, pstudi, bp As String
Texttahun.Text = “20” & Left(Textnpm.Text, 2)
n = Mid(Textnpm.Text, 3, 1)
If n = “1” Then
jurusan = “sistem informasi”
ElseIf n = “2” Then
jurusan = “tehnik informatika”
ElseIf n = “3” Then
jurusan = “manajemen informasi”
ElseIf n = “4” Then
jurusan = “manajemen & komputer akuntansi”
End If
n = Mid(Textnpm.Text, 4, 2)
If n = “01” Then
pstudi = “strata satu”
ElseIf n = “02” Then
pstudi = “diploma empat”
ElseIf n = “03” Then
pstudi = “diploma tiga”
ElseIf n = “04” Then
pstudi = “diploma dua”
End If
textjurusan.Text = jurusan
textpstudi.Text = pstudi
Textnurut.Text = Right(Textnpm.Text, 3)
End Sub

Private Sub Command1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
End Sub

Private Sub Command2_Click()
Data1.Recordset.Update
End Sub

Private Sub Command3_Click()
Data1.Recordset.Delete
End Sub

Private Sub Textnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Textnpm.SetFocus
End If
End Sub

tugas huruf

25 Jan

Image

Private Sub Cbogolongan_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case Cbogolongan.Text
Case “I”
gapok = 1500000
tunjangan = 150000
Case “II”
gapok = 2000000
tunjangan = 200000
Case “III”
gapok = 2500000
tunjangan = 250000
Case “IV”
gapok = 3000000
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

Private Sub Cmdbatal_Click()
Txtnidn.SetFocus
Txtnidn.Text = “”
txtnama.Text = “”
txtgolongan.Text = “”
Txtgapok.Text = “”
txttunjangan.Text = “”
txtpajak.Text = “”
txttotal.Text = “”

End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
Txtnidn.SetFocus
Txtnidn.Text = “”
txtnama.Text = “”
txtgolongan.Text = “”
Txtgapok.Text = “”
txttunjangan.Text = “”
txtpajak.Text = “”
txttotal.Text = “”

End Sub

Private Sub Form_Load()
Cbogolongan.AddItem “I”
Cbogolongan.AddItem “II”
Cbogolongan.AddItem “III”
Cbogolongan.AddItem “IV”

End Sub

Private Sub txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Cbogolongan.SetFocus
End If
End Sub

Private Sub Txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnama.SetFocus
End If
End Sub

DATA BUKU

25 Jan

Image

Private Sub Command1_Click()
Dim s, jb, peng, penr, hrg As String
Text4.Text = “20” & Left(Text1.Text, 2)
s = Mid(Text1.Text, 3, 1)
If s = “1” Then
jb = “indahnya dunia”
ElseIf s = “2” Then
jb = “cahaya ilahi”
ElseIf s = “3” Then
jb = “sistem pengantar komputer”
End If
Text2.Text = jb
s = Mid(Text1.Text, 4, 2)
If s = “01” Then
peng = “miftahudin stmik”
ElseIf s = “02” Then
peng = “samsul hadi”
ElseIf s = “03” Then
peng = “faizal imron”
End If
s = Mid(Text1.Text, 5, 2)
If s = “11” Then
pnrbt = “kompas candika”
ElseIf s = “12” Then
pnrbt = “raharja com”
ElseIf s = “13” Then
pnrbt = “maya colekword”
End If
s = Right(Text1.Text, 2)
If s = “45” Then
hrg = 25000
ElseIf s = “46” Then
hrg = 30000
ElseIf s = “47” Then
hrg = 35000
End If
Text3.Text = peng
Text5.Text = pnrbt
Text6.Text = hrg
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Text1_Change()

End Sub

VB

25 Jan

 

Image

 

Private Sub ChkBold_Click()
If ChkBold.Value = 1 Then
LblText.FontBold = True
Else
LblText.FontBold = False
End If
End Sub

Private Sub ChkItalic_Click()
If ChkItalic.Value = 1 Then
LblText.FontItalic = True
Else
LblText.FontItalic = False
End If
End Sub

Private Sub Chkstrike_Click()
If Chkunder.Value = 1 Then
LblText.FontStrikethru = True
Else
LblText.FontStrikethru = False
End If
End Sub

Private Sub Chkunder_Click()
If Chkunder.Value = 1 Then
LblText.FontUnderline = True
Else
LblText.FontUnderline = False
End If
End Sub

Private Sub CmdExit_Click()
Unload Me
End Sub

Private Sub OptBlue_Click()
LblText.ForeColor = vbBlue
End Sub

Private Sub OptGreen_Click()
LblText.ForeColor = vbGreen
End Sub

Private Sub OptRed_Click()
LblText.ForeColor = vbRed
End Sub

Private Sub Optyellow_Click()
LblText.ForeColor = vbYellow
End Sub

 

tugas buku

25 Jan

Image

Private Sub CmdBATAL_Click()
TxtKode.SetFocus
TxtKode.Text = “”
TxtJB.Text = “”
TxtPEM.Text = “”
TxtTT.Text = “”
TxtPEN.Text = “”
TxtHrg.Text = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
TxtKode.SetFocus
TxtKode.Text = “”
TxtJB.Text = “”
TxtPEM.Text = “”
TxtTT.Text = “”
TxtPEN.Text = “”
TxtHrg.Text = “”
End Sub

Private Sub CmdPROSES_Click()
Dim H As String
TxtTT.Text = “20” & Right(TxtKode.Text, 2)
H = Mid(TxtKode.Text, 3, 3)
If H = “SIM” Then
TxtJB.Text = “SISTEM INFORMASI MANAJEMEN”
ElseIf H = “EDP” Then
TxtJB.Text = “ELEKTRONIK DATA PROCESSING”
ElseIf H = “MJN” Then
TxtJB.Text = “MANAJEMEN”
ElseIf H = “CDR” Then
TxtJUDUL.Text = “CORELDRAW”
ElseIf H = “RPL” Then
TxtJB.Text = “REKAYASA PERANGKAT LUNAK”
End If
H = Left(TxtKode.Text, 1)
If H = “A” Then
TxtPEN.Text = “ANDI OFSET YOGYAKARTA”
ElseIf H = “I” Then
TxtPEN.Text = “INDAH SURABAYA”
ElseIf H = “S” Then
TxtPEN.Text = “SALEMBA”
ElseIf H = “E” Then
TxtPENText = “ELEK MEDIA KOMPUTION”
ElseIf H = “M” Then
TxtPEN.Text = “MAXICOM”
End If
H = Mid(TxtKode.Text, 3, 3)
If H = “SIM” Then
TxtPEM.Text = “ANDRA SETIAWAN”
ElseIf H = “EDP” Then
TxtPEM.Text = “DESI ISTIQOMAH”
ElseIf H = “MJN” Then
TxtPENGARANG.Text = “SANDI FITRAJAYA”
ElseIf H = “CDR” Then
TxtPEM.Text = “TRI INDAH SARI”
ElseIf H = “RPL” Then
TxtPEM.Text = “ERNITA”
End If
H = Mid(TxtKode.Text, 3, 3)
If H = “SIM” Then
TxtHrg.Text = “83000”
ElseIf H = “EDP” Then
TxtHrg.Text = “57000”
ElseIf H = “MJN” Then
TxtHrg.Text = “42000”
ElseIf H = “CDR” Then
TxtHrg.Text = “62000”
ElseIf H = “RPL” Then
TxtHrg.Text = “75900”
End If
End Sub

PERHITUNGAN DISKON DWI SEPTIANI

18 Jan

Image 

 

Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + (Text2.Text)
End Sub

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

 

Private Sub Command3_Click()
Unload Me
End Sub

 

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

NILAI MAHASISWAA

17 Jan

Image

Private Sub Command1_Click()
Text7.Text = Val((Text3.Text) + (Text4.Text) + (Text5.Text) + (Text6.Text)) / 4
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
End Sub

Private Sub Command3_Click()
Text1.SetFocus
Text1.Text = “”
Text2.Text = “”
Text3.Text = “”
Text4.Text = “”
Text5.Text = “”
Text6.Text = “”
Text7.Text = “”
End Sub

Private Sub Command4_Click()
Unload Me
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 Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub

Private Sub Text5_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text7.SetFocus
End If
End Sub

kakulator

17 Jan

Image
Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) + Val(Text2.Text)
End Sub

Private Sub Command2_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub

Private Sub Command3_Click()
Text3.Text = Val(Text1.Text) – Val(Text2.Text)
End Sub

Private Sub Command4_Click()
Text3.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub

Private Sub Command5_Click()
textnilai.SetFocus
textnilai1 = “”
textnilai2 = “”
texthasil = “”
End Sub

Private Sub Command6_Click()
Unload Me
End Sub

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

Private Sub Text2_Change()
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub

 

Aside 17 Jan

Image

Private Sub Command1_Click()
Text3.Text = Val(Text1.Text) * Val(Text2.Text)
End Sub

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

Private Sub Command3_Click()
Unload Me
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