We have some macros that run silently via scheduled tasks in the evenings. Occasionally, these macros will error in some way and we want to log these errors. I've found code that I can run that will append the error number and text to a table that we can view as a log. However, I don't know how to check for a specific error. For example, the error message for "can't append all the records in the append query" is error number 10510. But this "error" is not seen as an error in the macro (or even in vba). When I use the [MacroError].[Number] <> 0 in the condition column of my macro, it returns false and I single step through the macro and see that the "Error Number" is 0 even though it complains about not being able to append data. Is there a way to check for specific errors in a macro? What would be different about these errors that would show the "Error Number" as 0 even though it actually did show an error message?