TULISKAN NAMA

Gambar

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

End Sub

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

TAHUN MASUK

Gambar

Private Sub cmdbatal_Click()
Txtnama.SetFocus
Txtnama.Text = “”
txtnpm.Text = “”
Txtjur.Text = “”
Txtps.Text = “”
Txttm.Text = “”
Txtnu.Text = “”
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
Txtnama.SetFocus
Txtnama.Text = “”
txtnpm.Text = “”
Txtjur.Text = “”
Txtps.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, 3, 1)
If S = “1” Then
Txtjur.Text = “Sistem Informasi”
ElseIf S = “2” Then
Txtjur.Text = “Manajemen Informatika”
ElseIf S = “3” Then
Txtjur.Text = “Tehnik Informatika”
ElseIf S = “4” Then
Txtjur.Text = “Manajemen & Komp. Akuntansi”
End If
S = Mid(txtnpm.Text, 4, 2)
If S = “01” Then
Txtps.Text = “Strata Satu”
ElseIf S = “02” Then
Txtps.Text = “Diploma Tiga”
ElseIf S = “03” Then
Txtps.Text = “Diploma Empat”
ElseIf S = “04” Then
Txtps.Text = “Diploma Dua”
End If
Txtnu.Text = Right(txtnpm.Text, 3)
End Sub

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

End Sub

HURUF MUTU

Gambar

Private Sub cbonpm_Click()
Dim NM, JR As String
Select Case cbonpm.Text
Case “12100193”
NM = “Didi Herdiansyah”
JR = “Sistem Informasi”
Case “12201019”
NM = “Darwin Saputra”
JR = “Manajemen Informatika”
Case “12100187”
NM = “Hasan Alarifi”
JR = “Sistem Informasi”
Case “12201076”
NM = “Ahmad Tohir”
JR = “Manajemen Informatika”
Case “12201092”
NM = “Yohanes Krisnawan”
End Select
Txtnama.Text = NM
Txtjurusan.Text = JR
Txtquis.SetFocus
End Sub

Private Sub Cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = “”
Txtnama.Text = “”
Txtjurusan.Text = “”
Txtquis.Text = “”
Txttugas.Text = “”
Txtuts.Text = “”
Txtuas.Text = “”
Txtna.Text = “”
txthm.Text = “”

End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdproses_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(Txtquis.Text)
TUGAS = Val(Txttugas.Text)
UTS = Val(Txtuts.Text)
UAS = Val(Txtuas.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
Txtna.Text = NA

Select Case Txtna.Text
Case Is > 80
HM = “A”
Case Is > 70
HM = “B”
Case Is > 60
HM = “C”
Case Is > 50
HM = “D”
Case Is < 50
HM = “E”
End Select
txthm.Text = HM
End Sub

Private Sub Form_Load()
cbonpm.AddItem “12100193”
cbonpm.AddItem “12201019”
cbonpm.AddItem “12100187”
cbonpm.AddItem “12201076”
cbonpm.AddItem “12201092”
End Sub

Private Sub Txtquis_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txttugas.SetFocus
End If

End Sub

Private Sub Txttugas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtuts.SetFocus
End If
End Sub

Private Sub Txtuas_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim NA As Integer
Dim HM As String
QUIS = Val(Txtquis.Text)
TUGAS = Val(Txttugas.Text)
UTS = Val(Txtuts.Text)
UAS = Val(Txtuas.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
Txtna.Text = NA

Select Case Txtna.Text
Case Is > 80
HM = “A”
Case Is > 70
HM = “B”
Case Is > 60
HM = “C”
Case Is > 50
HM = “D”
Case Is < 50
HM = “E”
End Select
txthm.Text = HM
End If
End Sub

Private Sub Txtuts_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtuas.SetFocus
End If
End Sub

GAJI PEGAWAI

Gambar

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()
kosong

End Sub

Private Sub Cmdkeluar_Click()
Unload Me

End Sub

Private Sub Cmdlagi_Click()
kosong

End Sub

Public Sub kosong()
Txtnind.SetFocus
Txtnind.Text = “”
Txtnama.Text = “”
cbogolongan.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 Txtnind_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnama.SetFocus
End If

End Sub

FONT COLOR & FONT STYLE

Gambar

Private Sub Chkbold_Click()
If Chkbold.Value = 1 Then
lblteks.FontBold = True
Else
lblteks.FontBold = False
End If
End Sub

Private Sub Chkitalic_Click()
If Chkitalic.Value = 1 Then
lblteks.FontItalic = True
Else
lblteks.FontItalic = False
End If
End Sub

Private Sub Chkstrikeout_Click()
If Chkstrikeout.Value = 1 Then
lblteks.FontStrikethru = True
Else
lblteks.FontStrikethru = False
End If
End Sub

Private Sub Chkunderline_Click()
If Chkunderline.Value = 1 Then
lblteks.FontUnderline = True
Else
lblteks.FontUnderline = False
End If
End Sub

Private Sub Command1_Click()
Unload Me

End Sub

Private Sub Optblue_Click()
lblteks.ForeColor = vbBlue
End Sub

Private Sub Optgreen_Click()
lblteks.ForeColor = vbGreen
End Sub

Private Sub Optred_Click()
lblteks.ForeColor = vbRed
End Sub

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

APLIKASI PENGHITUNGAN GAJI

Gambar

Private Sub Command1_Click()
Text4.Text = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)
Text5.Text = Val(Text4.Text) * 0.1
Text6.Text = Val(Text4.Text) – Val(Text5.Text)
End Sub

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

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

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.Text = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)
Text5.Text = Val(Text4.Text) * 0.1
Text6.Text = Val(Text4.Text) – Val(Text5.Text)
End If
End Sub

Gambar

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.Text = Val(Text1.Text) * Val(Text2.Text)
    End If
End Sub

Gambar

Private Sub Command1_Click()
        Text3.Text = Val(Text1.Text) + Val(Text2.Text)
        Text4.Text = Val(Text1.Text) * Val(Text2.Text)
        Text5.Text = Val(Text1.Text) – Val(Text2.Text)
        Text6.Text = Val(Text1.Text) / Val(Text2.Text)
End Sub

Private Sub Command2_Click()
        Text1.SetFocus
        Text1 = “”
        Text2 = “”
        Text3 = “”
        Text4 = “”
        Text5 = “”
        Text6 = “”
        
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.Text = Val(Text1.Text) + Val(Text2.Text)
        Text4.Text = Val(Text1.Text) * Val(Text2.Text)
        Text5.Text = Val(Text1.Text) – Val(Text2.Text)
        Text6.Text = Val(Text1.Text) / Val(Text2.Text)
    End If
End Sub

Gambar

Private Sub Command1_Click()
        Text2.Text = Val(Text1.Text) * 0.1
        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.Text = Val(Text1.Text) * 0.1
        Text3.Text = Val(Text1.Text) – Val(Text2.Text)
    End If
End Sub