Declare the variable outside of your procedures:
-----------------------------------------------------------
Private intHighTestScore as Int32 'variable to hold the high test score
-----------------------------------------------------------
Then, inside your click event for the submit button after you calculate the current score, I am using a variable called intCurrentScore but you can substitute whatever you currently have:
-----------------------------------------------------------
'process code to get the current test score here and assign
'it to the variable intCurrentScore
If intCurrentScore > intHighTestScore Then
intHighTestScore = intCurrentScore
End If
-----------------------------------------------------------
You could then use the variable to display the score in a label, textbox, etc. The only problem is, once the application closes, you lose all of the information. A better way would be to store this data somewhere - a text file, database, etc.
J
|