In addition to clearing errors after you’ve dealt with them, the Err object has another important method called Raise. Err.Raise causes an error to occur, so that you can test your error-handling code. For example, the following code would generate a "File not found" error:
Err.Raise 53
By typing Err.Raise followed by an error code, you are able to cause an error. The error trap would then detour execution to the error handler to deal with the error.