PROGRAM 8 TUGAS 2 BP1

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

Select Case Cbonpm
 Case "17100095"
 nama = "ZEMA"
 jurusan = "Sistem Informasi"
 Case "17100096"
 nama = "RETNO NURAINI"
 jurusan = "Manajemen Informatika"
 Case "17100097"
 nama = "PAKI"
 jurusan = "Tehnik Informatika"
 Case "17100098"
 nama = "SAADAH"
 jurusan = "Teknik Mesin"
 Case "17100099"
 nama = " SITI"
 jurusan = "Teknik Komputer"
 End Select
 Txtnama = nama
 txtjurusan = jurusan
 txtquis.SetFocus

 End Sub


Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm = ""
Txtnama = ""
txtjurusan = ""
txtquis = ""
txttugas = ""
txtuts = ""
txtuas = ""
txtna = ""
txthm = ""

End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub
Private Sub Form_Load()
Cbonpm.AddItem "17100095"
Cbonpm.AddItem "17100096"
Cbonpm.AddItem "17100097"
Cbonpm.AddItem "17100098"
Cbonpm.AddItem "17100099"

End Sub
Private Sub Cmdproses_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(txtquis)
TUGAS = Val(txttugas)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna = NA

Select Case txtna
 Case Is > 80
 HM = "A"
 Case Is > 70
 HM = "B"
 Case Is > 60
 HM = "C"
 Case Is > 50
 HM = "D"
 Case Is < 40
 HM = "E"
  End Select
  txthm = HM
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

Private Sub txtuas_keypress(keyascii As Integer)
Dim NA As Integer
Dim HM As String
QUIS = Val(txtquis)
TUGAS = Val(txttugas)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna = NA

Select Case txtna
 Case Is > 80
 HM = "A"
 Case Is > 70
 HM = "B"
 Case Is > 60
 HM = "C"
 Case Is > 50
 HM = "D"
 Case Is < 40
 HM = "E"
  End Select
  txthm = HM
End Sub

 

Komentar

Postingan populer dari blog ini

KAPOLSEK PRINGSEWU “ANJAU SILAU” DENGAN MAHASISWA STMIK PRINGSEWU

Menyempurnakan Desain, PlayStation Memperbarui Desain Perangkat VR Mereka PSVR

MAHASISWA STMIK PRINGSEWU SAMBANGI SKH KEDAULATAN RAKYAT