
Private Sub cmbonpm_Click()
Dim nama, jurusan, HM As String
Select Case cmbonpm.Text
Case “1234”
nama = “WIDIA”
jurusan = “SISTEM INFORMASI”
Case “3456”
nama = “NOVITA”
jurusan = “MANAJEMEN INFORMATIKA”
Case “5678”
nama = “ROSIDA”
jurusan = “KOMPUTER AKUNTANSI”
End Select
txtnama = nama
txtjrus = jurusan
txtquis.SetFocus
End Sub
Private Sub cmndbtl_Click()
cmbonpm.SetFocus
cmbonpm = “”
txtnama = “”
txtjrus = “”
txtquis = “”
txttgas = “”
txtuts = “”
txtuas = “”
txtakhir = “”
End Sub
Private Sub cmndkluar_Click()
Unload Me
End Sub
Private Sub cmndproses_Click()
Dim NA As Integer
Dim HM As String
QUIS = Val(txtquis.Text)
TUGAS = Val(txttgas.Text)
UTS = Val(txtuts.Text)
UAS = Val(txtuas.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtakhir.Text = NA
Select Case txtakhir.Text
Case Is > 95
HM = “A”
Case Is > 80
HM = “B”
Case Is > 70
HM = “C”
Case Is > 60
HM = “D”
Case Is > 50
HM = “E”
End Select
txthm.Text = HM
End Sub
Private Sub Form_Load()
cmbonpm.AddItem “1234”
cmbonpm.AddItem “3456”
cmbonpm.AddItem “5678”
End Sub
Private Sub txtquis_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttgas.SetFocus
End If
End Sub
Private Sub txttgas_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