I have a problem getting the correct to count +1 every time I get an answer right
and the incorrect is the same.
I have two lbl's named number1 and number2 which produces a Rnd# in each lbl.
I have a txt box for the answer called useranswer.
A button to check if the answer is right called btnanswer.
I have just added two more lbl's for the correct named lblcorrect & the other is lblincorrect. How do I get this to count when the correct answer is correct and the incorrect well incorrect because right now I have a msgbox telling me if I have it correct but I want it to also show how many the code I have is like this:
[CODE=vb]Private Sub btnanswer_Click ()
Dim answer As Integer
answer = Val(Number1) + Val(Number2)
If Val(userAnswer) = answer Then
MsgBox ("YOU ARE CORRECT!")
End IF[/CODE]
and the incorrect is the same.
I have two lbl's named number1 and number2 which produces a Rnd# in each lbl.
I have a txt box for the answer called useranswer.
A button to check if the answer is right called btnanswer.
I have just added two more lbl's for the correct named lblcorrect & the other is lblincorrect. How do I get this to count when the correct answer is correct and the incorrect well incorrect because right now I have a msgbox telling me if I have it correct but I want it to also show how many the code I have is like this:
[CODE=vb]Private Sub btnanswer_Click ()
Dim answer As Integer
answer = Val(Number1) + Val(Number2)
If Val(userAnswer) = answer Then
MsgBox ("YOU ARE CORRECT!")
End IF[/CODE]
Comment