CalculateFullRebuild Method

Microsoft Excel Visual Basic

CalculateFullRebuild Method

       

For all open workbooks, forces a full calculation of the data and rebuilds the dependencies.

expression.CalculateFullRebuild

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

Remarks

Dependencies are the formulas that depend on other cells. For example, the formula "=A1" depends on cell A1. The CalculateFullRebuild method is similar to re-entering all formulas.

Example

This example compares the version of Microsoft Excel with the version of Excel in which the workbook was last calculated. If the two version numbers are different, a full calculation of the data in all open workbooks is performed and the dependencies are rebuilt.

Sub UseCalculateFullRebuild()

    If Application.CalculationVersion <> _
        Workbooks(1).CalculationVersion Then
        Application.CalculateFullRebuild
    End If

End Sub