program 4

tugas 4 picture

Private Sub cboNPM_Click()
Dim NM, JR As String
Select Case cboNPM.Text
Case “14201007”
NM = “UMI UMAYAH”
JR = “SISTEM INFORMASI”
Case “14100161”
NM = “ISMA ROBBY”
JR = “SISTEM INFORMASI”
Case “14100060”
NM = “EKA SUSI SURANTI”
JR = “SISTEM INFORMASI”
Case “14100142”
NM = “WULAN KURNIA SARASWATI”
JR = “SISTEM INFORMASI”
Case “14100153”
NM = “SITI NURROHMAH”
JR = “SISTEM INFORMASI”
Case “14100132”
NM = “YENI LESTARI”
JR = “SISTEM INFORMASI”
Case “14100124”
NM = “NANDA SUCI ADISETIA”
JR = “SISTEM INFORMASI”
Case “14201012”
NM = “M. HERVIN MARDANI”
JR = “MANAJEMEN INFORMATIKA”
Case “14100127”
NM = “SEPTIA RIASTUTI”
JR = “SISTEM INFORMASI”
Case “14201002”
NM = “FITRIANA”
JR = “MANAJEMEN INFORMATIKA”
End Select
txtnama = NM
txtjur = JR
txtquis.SetFocus
End Sub
Private Sub cmdbatal_Click()
txtnama.Text = “”
txtjur.Text = “”
txtquis.Text = “”
txttugas.Text = “”
txtuts.Text = “”
txtuas.Text = “”
txtna.Text = “”
txtmutu.Text = “”
cmbnpm.Text = “”
cmbnpm.SetFocus
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 = Val(txtuas.Text)
NA = (QUIS + TUGAS + UTS + UAS) / 4
txtna.Text = 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 txtmutu.Text = HM End Sub Private Sub Form_Load() cboNPM.AddItem “14201007” cboNPM.AddItem “14100161” cboNPM.AddItem “14100060” cboNPM.AddItem “14100142” cboNPM.AddItem “14100153” cboNPM.AddItem “14100132” cboNPM.AddItem “14100124” cboNPM.AddItem “14201012” cboNPM.AddItem “14100127” cboNPM.AddItem “14201002” 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 = Val(txtuas.Text) NA = (QUIS + TUGAS + UTS + UAS) / 4 txtna.Text = 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
txtmutu.Text = HM
End If
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

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s