Application.CalculationInterruptKey 属性 (Excel)

设置或返回 XlCalculationInterruptKey 常量,该常量指定在执行计算时可以中断 Microsoft Excel 的键。 读/写。

语法

表达式CalculationInterruptKey

expression:表示 Application 对象的变量。

示例

在本示例中,Microsoft Excel 确定对中断计算的键的设置,并通知用户。

Sub CheckInterruptKey() 
 
 ' Determine the calculation interrupt key and notify the user. 
 Select Case Application.CalculationInterruptKey 
 Case xlAnyKey 
 MsgBox "The calculation interrupt key is set to any key." 
 Case xlEscKey 
 MsgBox "The calculation interrupt key is set to 'Escape'" 
 Case xlNoKey 
 MsgBox "The calculation interrupt key is set to no key." 
 End Select 
 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。