Expand Minimize

NamedRange.NavigateArrow Method

Navigates a tracer arrow for the NamedRange control to the precedent, dependent, or error-causing cell or cells.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Object NavigateArrow(
	Object TowardPrecedent,
	Object ArrowNumber,
	Object LinkNumber
)

Parameters

TowardPrecedent
Type: System.Object
Specifies the direction to navigate: true to navigate toward precedents; false to navigate toward dependents.
ArrowNumber
Type: System.Object
Specifies the arrow number to navigate; corresponds to the numbered reference in the cell's formula.
LinkNumber
Type: System.Object
If the arrow is an external reference arrow, this argument indicates which external reference to follow. If this argument is omitted, the first external reference is followed.

Return Value

Type: System.Object
A Microsoft.Office.Interop.Excel.Range object that represents the new selection.

Selects the precedent, dependent, or error cells. This method causes an error if it is applied to a cell without visible tracer arrows.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example makes cell A1 a dependent of a NamedRange. The example then uses the ShowDependents method to draw an arrow between the NamedRange and the dependent cell, and calls the NavigateArrow method to select the dependent cell.

This example is for a document-level customization.


private void DisplayAndSelectDependents()
{
    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
        this.Controls.AddNamedRange(this.Range["C1", missing],
        "namedRange1");
    namedRange1.Value2 = "Smith";

    this.Range["A1", missing].Value2 = "=" +
        namedRange1.Address[false, true,
        Excel.XlReferenceStyle.xlA1, false, missing];

    namedRange1.ShowDependents(false);
    namedRange1.NavigateArrow(false, 1, missing);
}


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft