I made a quiz and at the end of the quiz the user gets feedback depending on how well they got. Here is the code:
Private Sub btnFinalScore_Click(sender As Object, e As EventArgs) Handles btnFinalScore.Click
lblScore11.Text = Val(lblScore10.Text)
If lblScore11.Text = 100 Then 'Deals if the user gets full marks
txtFinalFeedback.AppendText("CONGRATULATIONS! - You have achieved full marks!")
ElseIf lblScore11.Text = 90 Or 80 Or 70 Then 'Deals if the user gets between 70% to 90%l marks
txtFinalFeedback.AppendText("CONGRATULATIONS! - You only got a few questions wrong")
ElseIf lblScore11.Text = 60 Or 50 Or 40 Then 'Deals if the user gets between 40% to 60%l marks
txtFinalFeedback.AppendText("You got a fair few questions wrong, remember to go over these topics and repeat the quiz later")
ElseIf lblScore11.Text = 30 Or 20 Or 10 Then 'Deals if the user gets between 10% to 30%l marks
txtFinalFeedback.AppendText("You got a a lot of questions wrong, remember to go over these topics and repeat the quiz later")
Else
lblScore11.Text = 0 'Deals if the user gets no marks
txtFinalFeedback.AppendText("You got all the questions wrong, make sure to go over all the topics and repeat the quiz later")
End If
End Sub
If the user gets a 100 the first line of code works fine but if the user gets anything wrong, the second feedback is always given. How do I fix this?