Udostępnij za pośrednictwem


NamedRange.ShowDependents(Object) Method

Definition

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

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

Parameters

Remove
Object

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

Returns

Examples

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"],
        "namedRange1");
    namedRange1.Value2 = "Smith";

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

    namedRange1.ShowDependents(false);
    namedRange1.NavigateArrow(false, 1);
}
Private Sub DisplayAndSelectDependents()
    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
        = Me.Controls.AddNamedRange(Me.Range("C1"), _
        "namedRange1")
    namedRange1.Value2 = "Smith"

    Me.Range("A1").Value2 = "=" & _
        namedRange1.Address(False, True, _
        Excel.XlReferenceStyle.xlA1, False, )

    namedRange1.ShowDependents(False)
    namedRange1.NavigateArrow(False, 1, )
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