For more information on exceptions, you can use the Err object's Number and Description properties, like this:
Here's what you see when you run this console application:
Error number 6 occurred: Exception of type System.OverflowException was thrown.
You can determine the object that caused the exception using the Visual Basic Err object's Source property. This property holds the name of the object or application that caused the exception. For example, if you connect to Microsoft Excel and it generates an exception, Excel sets Err.Number to its error code for that exception, and it sets Err.Source to "Excel.Application".