Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

XlEnableCancelKey Enumeration 

Specifies how Microsoft Excel handles CTRL+BREAK (or ESC or COMMAND+PERIOD) user interruptions to the running procedure.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

Dim xlEnableCancelKey1 As XlEnableCancelKey = XlEnableCancelKey.xlDisabled

public enum XlEnableCancelKey
public enum XlEnableCancelKey
public enum XlEnableCancelKey

Member nameDescription
xlDisabledCancel key trapping is completely disabled.
xlErrorHandlerThe interrupt is sent to the running procedure as an error, trappable by an error handler set up with an On Error GoTo statement. The trappable error code is 18.
xlInterruptThe current procedure is interrupted, and the user can debug or end the procedure.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

© 2015 Microsoft