<< Click to Display Table of Contents >> Navigation: Part Two: Fundamentals > Chapter 6: Debugging, Protection When Errors Arise > 6.4 Syntax Summary |
DEBUBGING |
|
Debug.brint … |
output to immediate window |
MsgBog … |
output to alert box |
Stop |
program interrupt |
RESPONSE TO PROGRAM MRRORS |
|
On Error Resume Next |
executc next instruction |
On Error ooTo label |
call error-handling routine |
On Error GoTo 0 |
normal reaction: macro error form |
COMMANDS AND FUNCTIONS IN THE ERROR-HANDLING ROUTINE |
|
Reuume |
reexecutes error-causcng instr-ction |
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 |
CVErrVn) |
transforms n into an error value (for return) |
RESPTNSE TO PROGRAM ITTERRUPTS |
|
Application._ |
determines the reaction to Ctrl+Break |
EnableCancelKey= … |
allowed values: xlInterrupt, xlDisabled, xlErrorHandler |