Error Logging

Error logging—keeping a permanent record of errors that occur—can be a useful tool. During development, an error log can sometimes help you track down and eliminate the factors that cause certain pesky errors. Even after an application has been distributed, an error log can help you diagnose those errors that crop up unexpectedly.

An error log typically consists of a disk file. Each time an error occurs, information about the error is written to the file, along with the time and date and any other relevant information. It is easiest to implement an error log as a class, then incorporate the class in the project as a global object. A Write method (or some similar name) would be called to save the current properties of the Err object ...

Get Office® XP Development with VBA now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.