program 6

6

Program 6

 

Private Sub CmdBATAL_Click()

TxtYHSNAMA.SetFocus

TxtYHSNAMA.Text = “”

TxtYHSNPM.Text = “”

TxtYHSJUR.Text = “”

TxtYHSPS.Text = “”

TxtYHSTM.Text = “”

TxtYHSURUT.Text = “”

End Sub

 

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

 

 

 

Private Sub CmdLAGI_Click()

TxtYHSNAMA.SetFocus

TxtYHSNAMA.Text = “”

TxtYHSNPM.Text = “”

TxtYHSJUR.Text = “”

TxtYHSPS.Text = “”

TxtYHSTM.Text = “”

TxtYHSURUT.Text = “”

End Sub

 

Private Sub Cmdproses_Click()

Dim S As String

TxtYHSTM.Text = “20” & Left(TxtYHSNPM.Text, 2)

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

If S = “1” Then

TxtYHSJUR.Text = “Sistem Informasi”

ElseIf S = “2” Then

TxtYHSJUR.Text = “Manajemen Informatika”

End If

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

If S = “01” Then

TxtYHSPS.Text = “Strata Satu”

ElseIf S = “02” Then

TxtYHSPS.Text = “Diploma Tiga”

End If

TxtYHSURUT.Text = Right(TxtYHSNPM.Text, 3)

 

End Sub

 

Private Sub Form_Activate()

TxtYHSNAMA.SetFocus

TxtYHSNAMA.Text = “”

TxtYHSNPM.Text = “”

TxtYHSJUR.Text = “”

TxtYHSPS.Text = “”

TxtYHSTM.Text = “”

TxtYHSURUT.Text = “”

 

End Sub

 

Private Sub TxtTM_Change()

 

End Sub

 

Private Sub TxtYHSNAMA_Change()

If KeyAscii = 13 Then

TxtYHSNPM.SetFocus

End If

End Sub

 

Private Sub TxtYHSNAMA_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHSNPM.SetFocus

End If

 

End Sub

Advertisements

program 5

5

Pogram 5

 

 

Private Sub Cbogolongan_Click()

Dim gapok, pajak, tunjangan, total As Variant

Select Case Cbogolongan.Text

Case “I”

gapok = 500000000

tunjangan = 500000

Case “II”

gapok = 10000000

tunjangan = 1000000

Case “III”

gapok = 2500000

tunjangan = 250000

Case “IV”

gapok = 30000000

tunjangan = 3000000

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

End

End Sub

 

Private Sub Cmdlagi_Click()

TxtYHSNIP.SetFocus

TxtYHSNIP.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 Txtnip_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtnama.SetFocus

End If

 

End Sub

 

Private Sub TxtYHSNIP_Change()

 

End Sub

 

program 4

4

Program 4

 

 

 

Private Sub CboNPM_Click()

Dim NAMA, JURUSAN, HM As String

 

Select Case CboNPM.Text

Case “12201018”

NAMA = “ARIS SETIAWAN”

JURUSAN = “MANAJEMEN INRORMATIKA”

Case “12201020”

NAMA = “YOHANES KRISNAWAN”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “12201019”

NAMA = “DARWIN SAPUTRA”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “12201021”

NAMA = “METALIANA”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “12201018”

NAMA = “SITI FATHONAH”

JURUSAN = “Manajemen Informatika”

End Select

TxtYHSNAMA.Text = NAMA

TxtYHSJURUSAN.Text = JURUSAN

TxtYHSQUIS.SetFocus

End Sub

 

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

 

Private Sub CmdLAGI_Click()

CboNPM.SetFocus

CboNPM.Text = “”

TxtYHSNAMA.Text = “”

TxtYHSJURUSAN.Text = “”

TxtYHSQUIS.Text = “”

TxtYHSTUGAS.Text = “”

TxtYHSUTS.Text = “”

TxtYHSUAS.Text = “”

TxtYHSNA.Text = “”

TxtYHSHM.Text = “”

End Sub

 

Private Sub CmdPROSES_Click()

Dim NA As Integer

Dim HM As String

quis = Val(TxtYHSQUIS.Text)

TUGAS = Val(TxtYHSTUGAS.Text)

UTS = Val(TxtYHSUTS.Text)

UAS = Val(TxtYHSUAS.Text)

NA = (quis + TUGAS + UTS + UAS) / 4

TxtYHSNA.Text = NA

 

Select Case TxtYHSNA.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

  TxtYHSHM.Text = HM

End Sub

 

Private Sub Form_Load()

CboNPM.AddItem “12100018”

CboNPM.AddItem “12201020”

CboNPM.AddItem “12201019”

CboNPM.AddItem “12201021”

CboNPM.AddItem “12201018”

End Sub

 

 

Private Sub TxtYHSQUIS_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHSTUGAS.SetFocus

End If

End Sub

 

 

Private Sub TxtYHSTUGAS_KeyPress(KeyAscii As Integer)

If KESASCII = 13 Then

TxtYHSUAS.SetFocus

End If

End Sub

Private Sub TxtYHSUAS_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHSUTS.SetFocus

End If

End Sub

program 3

3

Program 3

Private Sub CboNPM_Click()

Dim NAMA, JURUSAN, HM As String

 

Select Case CboNPM.Text

Case “12201018”

NAMA = “ARIS SETIAWAN”

JURUSAN = “MANAJEMEN INRORMATIKA”

Case “12201020”

NAMA = “YOHANES KRISNAWAN”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “12201019”

NAMA = “DARWIN SAPUTRA”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “12201021”

NAMA = “METALIANA”

JURUSAN = “MANAJEMEN INFORMATIKA”

Case “12201018”

NAMA = “SITI FATHONAH”

JURUSAN = “Manajemen Informatika”

End Select

TxtYHSNAMA.Text = NAMA

TxtYHSJURUSAN.Text = JURUSAN

TxtYHSQUIS.SetFocus

End Sub

 

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

 

Private Sub CmdLAGI_Click()

CboNPM.SetFocus

CboNPM.Text = “”

TxtYHSNAMA.Text = “”

TxtYHSJURUSAN.Text = “”

TxtYHSQUIS.Text = “”

TxtYHSTUGAS.Text = “”

TxtYHSUTS.Text = “”

TxtYHSUAS.Text = “”

TxtYHSNA.Text = “”

TxtYHSHM.Text = “”

End Sub

 

Private Sub CmdPROSES_Click()

Dim NA As Integer

Dim HM As String

quis = Val(TxtYHSQUIS.Text)

TUGAS = Val(TxtYHSTUGAS.Text)

UTS = Val(TxtYHSUTS.Text)

UAS = Val(TxtYHSUAS.Text)

NA = (quis + TUGAS + UTS + UAS) / 4

TxtYHSNA.Text = NA

 

Select Case TxtYHSNA.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

TxtYHSHM.Text = HM

End Sub

 

Private Sub Form_Load()

CboNPM.AddItem “12100018”

CboNPM.AddItem “12201020”

CboNPM.AddItem “12201019”

CboNPM.AddItem “12201021”

CboNPM.AddItem “12201018”

End Sub

 

 

Private Sub TxtYHSQUIS_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHSTUGAS.SetFocus

End If

End Sub

 

 

Private Sub TxtYHSTUGAS_KeyPress(KeyAscii As Integer)

If KESASCII = 13 Then

TxtYHSUAS.SetFocus

End If

End Sub

Private Sub TxtYHSUAS_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHSUTS.SetFocus

End If

End Sub

 

 

 

 

program 2

2

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

 

Private Sub Cmdproses_Click()

Dim A, B, C, D, E, F As Double

TxtYHS4.Text = Val(TxtYHS1.Text) + Val(TxtYHS2.Text) – Val(TxtYHS2.Text)

TxtYHS5.Text = Val(TxtYHS4.Text) * (0.1)

TxtYHS6.Text = Val(TxtYHS4.Text) – Val(TxtYHS5.Text)

End Sub

 

Private Sub CmdULANG_Click()

TxtYHS1 = “”

TxtYHS2 = “”

TxtYHS3 = “”

TxtYHS4 = “”

TxtYHS5 = “”

TxtYHS6 = “”

End Sub

 

 

 

Private Sub TxtYHS1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHS2.SetFocus

End If

End Sub

 

 

Private Sub TxtYHS2_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHS3.SetFocus

End If

End Sub

 

 

Private Sub TxtYHS3_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Dim A, B, C, D, E, F As Double

TxtYHS4.Text = Val(TxtYHS1.Text) + Val(TxtYHS2.Text) – Val(TxtYHS2.Text)

TxtYHS5.Text = Val(TxtYHS4.Text) * (0.1)

TxtYHS6.Text = Val(TxtYHS4.Text) – Val(TxtYHS5.Text)

End If

End Sub

 

Program 2

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

PROGRAM 1

1
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 Chkstrikeout_Click()
If Chkstrikeout.Value = 1 Then
Lbltext.FontStrikethru = True
Else
Lbltext.FontStrikethru = False
End If
End Sub

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

Private Sub Cmdkeluar_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

PROGRAM 2

Untitled2'

PROGRAM SETELAH DISKON

Private Sub CmdHASIL_Click()

TxtYHS2.Text = Val(TxtYHS1.Text) * 0.1

TxtYHS3.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)

End Sub

Private Sub CmdKELUAR_Click()

Unload Me

End Sub

Private Sub CmdLAGI_Click()

TxtYHS1.SetFocus

TxtYHS1 = “”

TxtYHS2 = “”

TxtYHS3 = “”

End Sub

Private Sub TxtYHS1_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

TxtYHS2.Text = Val(TxtYHS1.Text) * 0.1

TxtYHS3.Text = Val(TxtYHS1.Text) – Val(TxtYHS2.Text)

End If

End Sub