Rabu, 22 November 2017

Tugas 2 Program 7 Bp1






























Private Sub Form_Load()
Cbonpm.AddItem "17100075"
Cbonpm.AddItem "17200089"
Cbonpm.AddItem "16300212"
Cbonpm.AddItem "17400056"
Cbonpm.AddItem "15400586"
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 "16300212"
 nama = "SUKINEM"
 jurusan = "Tehnik Sipil"
 Case "17400056"
 nama = "SAKIR KECIL"
 jurusan = "Tehnik Informatika"
 Case "15400586"
 nama = "MBAH WAGU"
 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

Tidak ada komentar:

Posting Komentar