Sample Code

The following sample code sample shows how to use On Error Goto and the ErrObject.

Private Sub mnTest_Click()
On Error GoTo lblErr
   '. . .
   Exit Sub

lblErr:
   MsgBox Err.Description
End Sub