Example 1:
Getting information on an error
Private Sub TestIErrorInfo() ' The following line asks VB to catch the error by going ' to the CatchError label On Error GoTo CatchError Dim mypix As New pixel mypix.Color = 17 Exit Sub CatchError: ' Now an exception occured, we can get information ' about it using the Err object MsgBox "The following error occured:" & Err.Description Exit Sub End Sub