NamedRange.CalculateRowMajorOrder Method
Calculates a specific range of cells.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function CalculateRowMajorOrder As Object
Object CalculateRowMajorOrder()
Return Value
Type: System.Object
An object that represents the calculation of a specific range of cells.
Remarks
The CalculateRowMajorOrder method calculates the specified range cell by cell, from its top-left corner to its bottom-right corner in row-major order. This is the same process that is used by Excel 2000 and earlier versions to calculate a range.
Examples
The following code example causes Excel to calculate the specified named range. To run this code example, add a named range control that spans one or more cells that contain some formulas and name it myFormulaRange.
This example is for a document-level customization.
Private Sub CalculateRange()
Dim myNamedRange As Microsoft.Office.Tools.Excel.NamedRange = _
Globals.Sheet1.myFormulaRange
myNamedRange.CalculateRowMajorOrder()
End Sub
private void CalculateRange()
{
Microsoft.Office.Tools.Excel.NamedRange myNamedRange =
Globals.Sheet1.myFormulaRange;
myNamedRange.CalculateRowMajorOrder();
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.