Tugas 3.4

aziz4

Private Sub Cbonpm_Click()

Dim nama, jurusan, HM As String

Select Case Cbonpm.Text

Case “14100418”

nama = “ABDUL AZIZ”

jurusan = “Sistem Informasi”

Case “14100190”

nama = “AHMAD SYAIFULOH”

jurusan = “Sistem Informasi”

Case “14100207”

nama = “RAIS ZULKARNAIN”

jurusan = “Sistem Informasi”

Case “14100213”

nama = “INDRI DESTRIANA”

jurusan = “Sistem Informasi”

Case “14100177”

nama = “JAMILAH”

jurusan = “Sistem Informasi”

Case “14100208”

nama = “SANDI ROYAN SAPUTRA”

jurusan = “Sistem Informasi”

Case “14100167”

nama = “SITI NUR JANAH”

jurusan = “Sistem Informasi”

Case “14100176”

nama = “IRWAN SUSILO”

jurusan = “Sistem Informasi”

Case “14100179”

nama = “IMAM SAMSUDIN”

jurusan = “Sistem Informasi”

Case “14100214”

nama = “MIFTAHUL KARIM”

jurusan = “Sistem Informasi”

End Select

Txtnama.Text = nama

Txtjurusan.Text = jurusan

Txtquis.SetFocus

End Sub

Private Sub cmdbatal_Click()

Cbonpm.SetFocus

Cbonpm.Text = “”

Txtnama.Text = “”

Txtjurusan.Text = “”

Txtquis = “”

Txttugas = “‘”

Txtuts = “”

Txtuas = “”

Txtna = “”

Txthm = “”

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 = (Txtuas.Text)

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

Txtna = 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 “14100418”

Cbonpm.AddItem “14100190”

Cbonpm.AddItem “14100207”

Cbonpm.AddItem “14100213”

Cbonpm.AddItem “14100177”

Cbonpm.AddItem “14100208”

Cbonpm.AddItem “14100167”

Cbonpm.AddItem “14100176”

Cbonpm.AddItem “14100179”

Cbonpm.AddItem “14100214”

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 Txtuts_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

Txtuas.SetFocus

End If

End Sub

Iklan
Standar

Tugas 3.3

Aziz3

Private Sub chkBold_Click()
Label2.FontBold = chkBold.Value
End Sub
Private Sub chkItalic_Click()
Label2.FontItalic = chkItalic.Value
End Sub
Private Sub chkStrike_Click()
Label2.FontStrikethru = chkStrike.Value
End Sub
Private Sub chkUnder_Click()
Label2.FontUnderline = chkUnder.Value
End Sub
Private Sub Command1_Click()
Label2.Caption = Text1.Text
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub optblue_Click()
Label2.ForeColor = vbBlue
End Sub
Private Sub optgreen_Click()
Label2.ForeColor = vbGreen
End Sub
Private Sub optred_Click()
Label2.ForeColor = vbRed
End Sub
Private Sub optyellow_Click()
Label2.ForeColor = vbYellow
End Sub

Standar

Tugas 3.2

Aziz2

Private Sub chkBold_Click()

‘membuat teks tebal

If chkBold.Value = 1 Then

lblTeks.FontBold = True

Else

lblTeks.FontBold = False

End If

End Sub

Private Sub chkItalic_Click()

‘membuat teks miring

If chkItalic.Value = 1 Then

lblTeks.FontItalic = True

Else

lblTeks.FontItalic = False

End If

End Sub

Private Sub chkStrike_Click()

‘membuat teks bergaris tengah

If chkStrike.Value = 1 Then

lblTeks.FontStrikethru = True

Else

lblTeks.FontStrikethru = False

End If

End Sub

Private Sub chkUnder_Click()

‘membuat teks bergaris bawah

If chkUnder.Value = 1 Then

lblTeks.FontUnderline = True

Else

lblTeks.FontUnderline = False

End If

End Sub

Private Sub cmdExit_Click()

End

End Sub

Private Sub optBlue_Click()

‘membuat teks berwarna biru

lblTeks.ForeColor = vbBlue

End Sub

Private Sub optGreen_Click()

‘membuat teks berwarna hijau

lblTeks.ForeColor = vbGreen

End Sub

Private Sub optRed_Click()

‘membuat teks berwarna merah

lblTeks.ForeColor = vbRed

End Sub

Private Sub optYellow_Click()

‘membuat teks berwarna kuning

lblTeks.ForeColor = vbYellow

End Sub

Standar

Tugas 3.1

1

Private Sub Cbonpm_Click()
Dim nama, jurusan, HM As String

Select Case Cbonpm.Text
Case “14100418”
nama = “Abdul Aziz”
jurusan = “Sistem Informasi”
Case “14100190”
nama = “AHMAD SYAIFULOH”
jurusan = “Sistem Informasi”
Case “14100207”
nama = “RAIS ZULKARNAIN”
jurusan = “Sistem Informasi”
Case “14100213”
nama = “INDRI DESTRIANA”
jurusan = “Sistem Informasi”
Case “14100177”
nama = “JAMILAH”
jurusan = “Sistem Informasi”
Case “14100208”
nama = “SANDI ROYAN SAPUTRA”
jurusan = “Sistem Informasi”
Case “14100167”
nama = “SITI NUR JANAH”
jurusan = “Sistem Informasi”
Case “14100176”
nama = “IRWAN SUSILO”
jurusan = “Sistem Informasi”
Case “14100179”
nama = “IMAM SAMSUDIN”
jurusan = “Sistem Informasi”
Case “14100214”
nama = “MIFTAHUL KARIM”
jurusan = “Sistem Informasi”
End Select

Txtnama.Text = nama
Txtjurusan.Text = jurusan
Txtquis.SetFocus
End Sub

Private Sub cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm.Text = “”
Txtnama.Text = “”
Txtjurusan.Text = “”
Txtquis = “”
Txttugas = “‘”
Txtuts = “”
Txtuas = “”
Txtna = “”
Txthm = “”
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 = (Txtuas.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
Txtna = 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 “14100418” Cbonpm.AddItem “14100190” Cbonpm.AddItem “14100207” Cbonpm.AddItem “14100213” Cbonpm.AddItem “14100177” Cbonpm.AddItem “14100208” Cbonpm.AddItem “14100167” Cbonpm.AddItem “14100176” Cbonpm.AddItem “14100179” Cbonpm.AddItem “14100214” 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 = (Txtuas.Text) NA = (QUIS + TUGAS + UTS + UAS) / 4 Txtna = 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

Standar

Tugas 2 Nomor 5

aziz

Private Sub Command1_Click()
Text3.Text = Val(Text1) + Val(Text2)
Text6.Text = Val(Text4) * Val(Text5)
Text9.Text = Val(Text7) – Val(Text8)
Text12.Text = Val(Text10) / Val(Text11)
End Sub

Private Sub Command2_Click()
Text1.SetFocus
Text1 = “”
Text2 = “”
Text3 = “”
Text4 = “”
Text5 = “”
Text6 = “”
Text7 = “”
Text8 = “”
Text9 = “”
Text10 = “”
Text11 = “”
Text12 = “”
End Sub

Private Sub Command3_Click()
End
End Sub

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

Private Sub Text11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.Text = Val(Text1) + Val(Text2)
Text6.Text = Val(Text4) * Val(Text5)
Text9.Text = Val(Text7) – Val(Text8)
Text12.Text = Val(Text10) / Val(Text11)
End If
End Sub
Private Sub Text2_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_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text7.SetFocus
End If
End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text8.SetFocus
End If
End Sub

Private Sub Text8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text10.SetFocus
End If
End Sub

Standar

Tugas2 Nomor 3

C

 

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

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

Private Sub Command3_Click()
End
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) + Val(Text2) – Val(Text3)
Text5.Text = Val(Text4) * 0.1
Text6.Text = Val(Text4) – Val(Text5)
End If
End Sub

Standar