5A

Private Sub cbonpm_Click()

Dim nama, jurusan, HM As String

       

        Select Case cbonpm.Text

           

            Case “12100072”

            nama = “SITI MAIY SAROH”

            jurusan = “Sistem Informasi”

           

            Case “12100073”

            nama = “SITI MARYAM”

            jurusan = “Sistem Informasi”

           

            Case “12100074”

            nama = “ARNA SETIAWATI”

            jurusan = “Sistem Informasi”

           

            Case “12100053”

            nama = “SULIS WAHYU NINGSIH”

            jurusan = “Sistem Informasi”

           

            Case “12100089”

            nama = “JENTINA FELELI”

            jurusan = “Sistem Informasi”

          

        End Select

 

txtnama.Text = nama

txtjurusan.Text = jurusan

txtquis.SetFocus

End Sub

 

Private Sub CMDBATAL_Click()

cbonpm.SetFocus

cbonpm = “”

txtnama = “”

txtjurusan = “”

txtquis = “”

txttugas = “”

txtuts = “”

txtuas = “”

txtNA = “”

txtHM = “”

End Sub

 

Private Sub CMDKELUAR_Click()

End

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

  txtHM.Text = HM

 End Sub

 

 

Private Sub Form_Load()

cbonpm.AddItem “12100072”

cbonpm.AddItem “12100073”

cbonpm.AddItem “12100074”

cbonpm.AddItem “12100053”

cbonpm.AddItem “12100089”

End Sub

 

 

Private Sub txtnama_Change()

 

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

5B

53