Public Function AssignGrade(studentScore As Single) As String
Select Case studentScore
Case 90 To 100
AssignGrade = "A"
Case Is >= 80
AssignGrade = "B"
Case 70 To 80
AssignGrade = "C"
Case Is >= 60
AssignGrade = "D"
Case Else
AssignGrade = "F" End Select End Function