VBA's Error Handling: How can it be done better? (2 Viewers)

ChrisO

Registered User.
Local time
Tomorrow, 05:19
Joined
Apr 30, 2003
Messages
3,202
That was just one of the errors produced in the sample I gave. There was another error where the code added error handling to procedures that may not want it. Those procedures may have been designed to pass the error back to the caller and the code which generated the error handlers can not see that subtlety; it couldn’t even see the line continuation. The compile errors may be fixed but the compiler will not pick up that subtlety. Therefore the whole project needs testing again and with a large project that can mean a lot of time. The quick fix could turn into months, waiting for a subtle error to arise and that error could have been induced by the addition of the error handling.

Here’s the thing as I see it.
Some people want a silver bullet and some code writers are fascinated with code which writes code. The people who want a silver bullet will not understand the subtlety and the people writing the silver bullet are controlled by their fascination.

Make plenty of backups and with a large project make more than plenty.

Chris.
 

Users who are viewing this thread

Top Bottom