Maybe it is because you're initializing the score in the same procedure that you're adding it to?
I am assuming the snippet you posted is from the "Check Answer" [or something like that] button's Click event handler.
Here's how I would go about it:
Code:'Declarations Private score As Integer = 0 Private userAnswer As Decimal '...Form Initialization Code... Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If Decimal.TryParse(TextBox1.Text, userAnswer) Then If answer = userAnswer Then score += 1 TextBox2.Text = score MsgBox("Congrats") Else MsgBox("Incorrect Answer") End If End If End Sub






Peace!
Reply With Quote