Private Sub Form_Load()
Cbonpm.AddItem "17100075"
Cbonpm.AddItem "17200089"
Cbonpm.AddItem "16200092"
Cbonpm.AddItem "17200256"
Cbonpm.AddItem "16100232"
End Sub
Private Sub Cbonpm_Click()
Dim nama, jurusan, HM As String
Select Case Cbonpm
Case "17100075"
nama = "DWI AGUNG CAHYADI"
jurusan = "Sistem Informasi"
Case "17200089"
nama = "IMAMUDDIN"
jurusan = "Manajemen Informatika"
Case "16200092"
nama = "ZILONG"
jurusan = "Tehnik Sipil"
Case "17200256"
nama = "NANA"
jurusan = "Tehnik Informatika"
Case "16100232"
nama = "BALMOND"
jurusan = "MANAGEMENT SISTEM INFORMASI"
End Select
txtnm = nama
txtjr = jurusan
txtnq.SetFocus
End Sub
Private Sub Cmdbatal_Click()
Cbonpm.SetFocus
Cbonpm = ""
txtnm = ""
txtjr = ""
txtnq = ""
txtnt = ""
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(txtnq)
TUGAS = Val(txtnt)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA
Select Case txtna
Case Is = 100
HM = "A"
Case Is >= 80
HM = "A"
Case Is >= 70
HM = "B"
Case Is >= 60
HM = "C"
Case Is >= 50
HM = "D"
Case Is <= 49
HM = "E"
End Select
txthm.Text = HM
End Sub
Private Sub txtnq_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnt.SetFocus
End If
End Sub
Private Sub txtnt_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)
If KeyAscii = 13 Then
txtuas.SetFocus
Dim NA As Integer
Dim HM As String
QUIS = Val(txtnq)
TUGAS = Val(txtnt)
UTS = Val(txtuts)
UAS = Val(txtuas)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = NA
Select Case txtna
Case Is = 100
HM = "A"
Case Is >= 80
HM = "A"
Case Is >= 70
HM = "B"
Case Is >= 60
HM = "C"
Case Is >= 50
HM = "D"
Case Is <= 49
HM = "E"
End Select
txthm.Text = HM
End If
End Sub
0 komentar:
Posting Komentar