Microsoft KB Archive/149252

= EnableCancelKey Property Uses xlDisabled Constant =

Article ID: 149252

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 95a
 * Microsoft Excel 5.0c
 * Microsoft Excel 5.0 Standard Edition
 * Microsoft Excel 5.0a for Macintosh

-



This article was previously published under Q149252



SYMPTOMS
The following two paragraphs about Microsoft Excel can be found on page 187 of the Microsoft Excel "Visual Basic User's Guide" and page 137 of "Microsoft Excel/Visual Basic Programmer's Guide":

You can also ignore user interrupts completely by setting the EnableCancelKey property to xlIgnore. In this condition, Microsoft Excel ignores all attempts by the user to interrupt the running procedure.

Note Use caution when disabling or ignoring user interrupts. It is possible to write code that never returns or ends. If you disable interrupts by setting the EnableCancelKey property to xlIgnore, or if you always use the Resume statement to return from a trapped error, your procedure will not return control to the user.



MORE INFORMATION
These statements are incorrect. To make the statements correct, replace every instance of the word "xlIgnore" with the word "xlDisabled". The constant xlDisabled is referred to in Visual Basic online Help.

For additional information, please see the following article in the Microsoft Knowledge Base:

146864 Error Trapping with Visual Basic for Applications

