Compartilhar via


NamedRange.ShowPrecedents(Object) Method

Definition

Draws tracer arrows to the direct precedents of the NamedRange control.

public object ShowPrecedents (object Remove);
abstract member ShowPrecedents : obj -> obj
Public Function ShowPrecedents (Optional Remove As Object) As Object

Parameters

Remove
Object

true to remove one level of tracer arrows to direct precedents; false to expand one level of tracer arrows. The default value is false.

Returns

Examples

The following code example makes cell A1 a precedent of a NamedRange. The example then uses the ShowPrecedents method to draw an arrow between the NamedRange and the precedent cell.

This example is for a document-level customization.

private void DisplayPrecedents()
{
    this.Range["A1"].Value2 = 1710;

    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
        this.Controls.AddNamedRange(this.Range["C1"],
        "namedRange1");
    namedRange1.Value2 = "=A1";
    namedRange1.ShowPrecedents(false);
}
Private Sub DisplayPrecedents()
    Me.Range("A1").Value2 = 1710

    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
        = Me.Controls.AddNamedRange(Me.Range("C1"), _
        "namedRange1")
    namedRange1.Value2 = "=A1"
    namedRange1.ShowPrecedents(False)
End Sub

Remarks

The NamedRange control must be a single cell.

Optional Parameters

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

Applies to