on error allows for some basic poor man's error handling in a VBA program. on error resume next ' Ignore errors and continue executing statement as though nothing had happened. on error goto 0 ' Disable policy handling (? that is use error handling of calling procedure ?) on error goto LABEL ' Jump to label LABEL when error occurs
on error… err object (by calling err.clear()). on error resume next, statements that cause an error are just skipped. The resume next indicates to execute the next statement.