My issue is that I am attempting to make the user only able to enter "a, b, c or d". I would rather have it error out if they did not enter one of those four letters than the user only being able to input those letters. I have only been able to find resources that do something similar to this with numeric data (using try catch). Any sites or hints would be great.
If String.Compare(TextBox2.Text, "a", True) = 0 AndAlso String.Compare(TextBox21.Text, "a", True) = 0 Then
'MessageBox.Show("A")
totCorrect = totCorrect + corAns
ElseIf String.Compare(TextBox2.Text, "b", True) = 0 AndAlso String.Compare(TextBox21.Text, "b", True) = 0 Then
'MessageBox.Show("B")
totCorrect = totCorrect + corAns
ElseIf String.Compare(TextBox2.Text, "c", True) = 0 AndAlso String.Compare(TextBox21.Text, "c", True) = 0 Then
'MessageBox.Show("C")
totCorrect = totCorrect + corAns
ElseIf String.Compare(TextBox2.Text, "d", True) = 0 AndAlso String.Compare(TextBox21.Text, "d", True) = 0 Then
'MessageBox.Show("D")
totCorrect = totCorrect + corAns
Else
totWrong = totWrong + wrgAns
Label13.Visible = True
End If