WorkbookBase.CalculationVersion Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a number that indicates the version of Excel that the workbook was last fully recalculated by. The rightmost four digits are the minor calculation engine version number, and the other digits (on the left) are the major version of Microsoft Office Excel.
public:
property int CalculationVersion { int get(); };
public int CalculationVersion { get; }
member this.CalculationVersion : int
Public ReadOnly Property CalculationVersion As Integer
Property Value
A number that indicates the version of Excel that the workbook was last fully recalculated by. The rightmost four digits are the minor calculation engine version number, and the other digits (on the left) are the major version of Microsoft Office Excel.
Examples
The following code example uses the CalculationVersion property to display the version of Excel in which the workbook was last fully recalculated.
This example is for a document-level customization.
private void DisplayCalculationVersion()
{
if (this.CalculationVersion == 0)
{
MessageBox.Show("This workbook has not been calculated.");
}
else
{
MessageBox.Show("This workbook was last calculated in version " +
this.CalculationVersion);
}
}
Private Sub DisplayCalculationVersion()
If Me.CalculationVersion = 0 Then
MsgBox("This workbook has not been calculated.")
Else
MsgBox("This workbook was last calculated in version " & _
Me.CalculationVersion)
End If
End Sub
Remarks
If the workbook was saved in an earlier version of Excel and if the workbook has not been fully recalculated, then this property returns 0.