Well, if you had the code:
Code:
Sub madeup()
If (document.frmExample5a.txtAge.value < 0) Or _
(document.frmExample5a.txtAge.value > 100) Then
MsgBox "The age you entered is invalid."
Exit Sub
End If
'
'
'Information for processing information without checking things are valid.
'
'
End Sub This i have made up a sub called "madeup", if i wanted to process some information, i may wish to check a value, the if statement does this, when it checks, say i put 101 in the box it will the start showing me the message box, when you click ok in the message box it will continue processing the rest of the code, Exit Sub comes next which means it will Exit the sub rather than it continuing to process the information regardless. (this means where i have put a comment in my code for more statements it wont read there.
Hope that helps, if i have confused you let me know lol.
Lee.