全部显示

CalculationInterruptKey 属性

       

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

expression.CalculationInterruptKey

expression   必需。该表达式返回“应用于”列表中的对象之一。

示例

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

Sub CheckInterruptKey()

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

End Sub