CheckAbort Method

Microsoft Excel Visual Basic

CheckAbort Method

       

Stops recalculation in a Microsoft Excel application.

expression.CheckAbort(KeepAbort)

expression   Required. An expression that returns one of the objects in the Applies To list.

KeepAbort  Optional Variant. Allows recalculation to be performed for a Range.

Example

In this example, Microsoft Excel stops recalculation in the application except for cell A10. In order to see results from this example, it is assumed that other calculations exist in the application which will allow the user to see the differences between the chosen cell and the cells not chosen.

Sub UseCheckAbort()

    Dim rngSubtotal As Variant
    Set rngSubtotal = Application.Range("A10")

    ' Stop recalculation except for designated cell.
    Application.CheckAbort (KeepAbort:=rngSubtotal)

End Sub