Selasa, 21 November 2017

Hurug Mutu Mahasiswa Stmik Pringsewu Tanpa Keypress (2.7)

Private Sub cbonpm_click()
Dim nama, jurusan, hm As String

Select Case cbonpm.Text
Case "17100003"
nama = "Renaldi Zainal Arifin"
jurusan = "Sistem Informasi"
Case "17100004"
nama = "Eka Kartika"
jurusan = "Sistem Informasi"
Case "17100006"
nama = "Rosi elvia"
jurusan = "Sistem Informasi"
Case "17100008"
nama = "M.Galih algofur"
jurusan = "Sistem Informasi"
Case "17100010"
nama = "Novia Anggraini"
jurusan = "Sistem Informasi"
Case "17100011"
nama = "Ariansyah"
jurusan = "Sistem Informasi"
Case "17100012"
nama = "Dimas Apriangga"
jurusan = "Sistem Informasi"
Case "17100013"
nama = "Irmanida Siswanti"
jurusan = "Sistem Informasi"
End Select
txtmhs.Text = nama
txtjur.Text = jurusan
txtquis.SetFocus
End Sub

Private Sub cmdbatal_Click()
cbonpm.SetFocus
cbonpm.Text = ""
txtmhs.Text = ""
txtjur.Text = ""
txtquis.Text = ""
txttgs.Text = ""
txtuts.Text = ""
txtuas.Text = ""
txtna.Text = ""
txthm.Text = ""
End Sub


Private Sub cmdproses_Click()
Dim na As Integer
Dim hm As String
quis = Val(txtquis.Text)
tugas = Val(txttgs.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
txthm.Text = hm
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub


Private Sub Form_Load()
cbonpm.AddItem "17100003"
cbonpm.AddItem "17100004"
cbonpm.AddItem "17100006"
cbonpm.AddItem "17100008"
cbonpm.AddItem "17100010"
cbonpm.AddItem "17100011"
cbonpm.AddItem "17100012"
cbonpm.AddItem "17100013"
End Sub



0 komentar:

Posting Komentar