(adsbygoogle = window.adsbygoogle || []).push({});
Private Sub btnCheck_Click(sender As Object, e As EventArgs) Handles btnCheck.Click
Dim userAnswer As Integer = 0
If Integer.TryParse(txtAnswer.Text, userAnswer) Then
'Checking the answer and assign the color to
'feedback.
If answer = userAnswer Then
lblFeedback.ForeColor = Color.Green
lblFeedback.Text = "Correct answer!"
Else
lblFeedback.ForeColor = Color.Red
lblFeedback.Text = "Sorry, but the answer should have been " & answer.ToString
End If
Else
lblFeedback.ForeColor = Color.Red
lblFeedback.Text = "Please enter a valid integer."
End If
End Sub

Private Sub btnNext_Click(sender As Object, e As EventArgs) Handles btnNext.Click
'Variable for random integers
Dim rand As New Random
txtAnswer.Clear()
lblFeedback.Text = ""
Dim op1 As Integer = rand.Next(MAXRANGE) + MINVAL
Dim op2 As Integer = rand.Next(MAXRANGE) + MINVAL
'Answer for addition
If radAddition.Checked Then
lblProblem.Text = op1.ToString & " + " & op2.ToString & " = "
answer = op1 + op2
txtAnswer.Text = answer
'Answer for subtraction
ElseIf radSubtraction.Checked Then
lblProblem.Text = op1.ToString & " - " & op2.ToString & " = "
answer = op1 - op2
txtAnswer.Text = answer
'Answer for multiplication
ElseIf radMultiplication.Checked Then
'Adjust the sizes
op1 = op1 \ 2
op2 = op2 \ 2
lblProblem.Text = op1.ToString & " * " & op2.ToString & " = "
answer = op1 * op2
txtAnswer.Text = answer
'Answer for division
ElseIf radDivision.Checked Then
'Adjust so the quotient is always even
Do
op2 = rand.Next(50) + 1
Loop Until op1 Mod op2 = 0 And op2 < op1
lblProblem.Text = op1.ToString & " / " & op2.ToString & " = "
answer = op1 \ op2
txtAnswer.Text = answer
End If
'

isplay the message
Label1.Text = "Please type in your answer to the following math problem. Integer answers only:"
End Sub

The things I need:
There should also be an exit button that ends the program, BUT before doing so, it displays in a MessageBox, the number of correct, incorrect and total number of problems attempted. To accomplish this, you will need two form level variables. Each time the 'Chek your answer' button is clicked adjust the values in these variables. The total number of problems attempted is the sum of these variables. It may be convenient to create a msg varianble of type String which has the statistics stored in it and then use it as an argument to MessageBox.Show.