Select Case percent
Case 0
UserAnswer = MsgBox("Unfortunately,
you didn't answer any question
correctly. Would you
like to take the test over?", vbYesNo)
Case 1 To 50
UserAnswer = MsgBox("Unfortunately,
you only got " & correct & " correct answers to these " &
TotalQuestions & _
"
questions. Would you like to take the test over?", vbYesNo)
Case 51 To 75
UserAnswer = MsgBox("Not too
bad. You answered " & correct & "
questions correctly out of " & TotalQuestions & _
". Would
you like to take the test over?", vbYesNo)
Case 76 To 85
UserAnswer = MsgBox("Pretty
good, Elizabeth! You got " & correct & "
questions right out of " & TotalQuestions & _
"! Would
you like to take the test over?", vbYesNo)
Case 86 To 95
UserAnswer = MsgBox("Very
good, Elizabeth! You answered " & correct & "
questions correctly out of " & TotalQuestions & _
"! Would
you like to take the test over?", vbYesNo)
Case 96 To 99
UserAnswer = MsgBox("Almost perfect, Elizabeth! You answered " & correct
& " questions correctly out of " &
TotalQuestions & _
"! Would
you like to take the test over?", vbYesNo)
Case 100
MsgBox("Excellent, Elizabeth! You got
every question right. A perfect score!")
UserAnswer = 7
End Select
Loop Until UserAnswer = 7 'no
End