DEBUGGING | |
---|---|
Debug.Print | output to immediate window |
MsgBox | output to alert box |
Stop | program interrupt |
RESPONSE TO PROGRAM ERRORS | |
---|---|
On Error Resume Next | execute next instruction |
On Error GoTo label | call error-handling routine |
On Error GoTo 0 | normal reaction: macro error form |
COMMANDS AND FUNCTIONS IN THE ERROR-HANDLING ROUTINE | |
---|---|
Resume | reexecutes error- causing instruction |
Resume Next | resumes at the next instruction |
Resume label | resumes at label |
Err | returns the current error number |
Error(n) | returns the text of error number n |
Error n | simulates an error |
CVErr(n) | transforms n into an error value (for return) |
RESPONSE TO PROGRAM INTERRUPTS | |
---|---|
Application ._ | determines the reaction to Ctrl+Break |
EnableCancelKey = | allowed values: xlInterrupt , xlDisabled , xlErrorHandler |