6.4 Syntax Summary


6.4 Syntax Summary

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




Definitive Guide to Excel VBA
Linux Application Development For The Enterprise (Charles River Media Programming)
ISBN: 1584502533
EAN: 2147483647
Year: 2002
Pages: 134

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net