Visual Basic Matt
Apprentice
Ok, I am working on hiscore lookup. It work's fine. The problem is, is that when you type in an invalid username. (Does not feature in the hiscores) You get the error,
I don't need to fix the error just need to make a msgbox come up (Username) Does not feature in the high scores. So basicly instead of the vb error box,
A msg box
I am almost 100% sure that their is somthing like,
Thank's for all your help
Code:
Run-time error '9':
Subscript out of range
Code:
Run-time error '9':
Subscript out of range
Code:
MsgBox (txtUsername.Text) + " does not feature in the hiscores!", vbCritical = vbOKOnly, "Oops!": Exit Sub
Code:
Private sub cmdLookup()
If txtUsername.Text = "" Then
MsgBox "You can't leave the username feild empty!"
Else
lstHighscores.Clear
getHighscores txtUsername.Text
End if
on error (9) goto featureerror
End sub
Public Sub featureerror()
MsgBox (txtUsername.Text) + " does not feature in the hiscores!", vbCritical = vbOKOnly, "Oops!": Exit Sub
End Sub
Thank's for all your help



