It occurs because there is no error handler within the executing code, including calling procedures. You cannot make the assumption that On Error Goto 0
was used.
I am assuming you mean an unhandled run-time error. Since it is unhandled, your application "ends abnormally".
Visual Basic Concepts, Error Handling Hierarchy, http://msdn.microsoft.com/en-us/library/aa241677(VS.60).aspx
If an error has been handled by either
a Resume Next or a Goto then surely a
run-time error would not occur. True
or False?
False. Sometimes a run-time error will occur in the error handler. If your error handling logic misses this, you will get an unhandled run-time error.
More Information
Briefly, using On Error Goto 0
removes any error handler (disables or turns off) within the procedure until the procedure ends or you assign an error handler using one of the On Error
statements. User-Interface events with no error handling code will also have no error handler until you define one.
Error Trapping
During debugging, you can specify "Error Trapping" which causes VBE to break "on-all-errors", "in-class-module", or "on-unhandled-errors". During run-time, the behavior is "On Unhandled Errors" (A run-time error will occure if the Visual Basic Run-Time Library can find no error handler.). If you are troubleshooting / debugging, try setting "Error Trapping" to "Break on All Errors". This will cause VBE to break at the point of the error, where you can start debugging or just contine execution.