Share via


XmlMappedRange.Dependents Property (2007 System)

Gets a Range that represents the range containing all the dependents of the XmlMappedRange control.

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property Dependents As Range
'Usage
Dim instance As XmlMappedRange 
Dim value As Range 

value = instance.Dependents
[BrowsableAttribute(false)]
public Range Dependents { get; }
[BrowsableAttribute(false)]
public:
property Range^ Dependents {
    Range^ get ();
}
public function get Dependents () : Range

Property Value

Type: Range
A Range that contains all the dependents of the XmlMappedRange control.

Remarks

This can be a multiple selection (a union of Range objects) if there is more than one dependent.

The Dependents property only works on the active sheet and cannot trace remote references.

Examples

The following code example sets a reference in cell A1 to refer to an XmlMappedRange, and then sets a reference in cell A2 to refer to cell A1. The code example then uses the Dependents property to select the dependents of CustomerLastNameCell, which are cells A1 and A2. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub SelectDependents()
    Me.CustomerLastNameCell.Value2 = "Smith" 
    Me.Range("A1").Value2 = "=" & Me.CustomerLastNameCell.Address _
        (False, True, Excel.XlReferenceStyle.xlA1, False)
    Me.Range("A2").Value2 = "=A1" 
    Me.CustomerLastNameCell.Dependents.Select()
End Sub
private void SelectDependents()
{
    this.CustomerLastNameCell.Value2 = "Smith";
    this.Range["A1", missing].Value2 = "=" + 
        this.CustomerLastNameCell.Address[false, true,
        Excel.XlReferenceStyle.xlA1, false, missing];

    this.Range["A2", missing].Value2 = "=A1";
    this.CustomerLastNameCell.Dependents.Select();
}

.NET Framework Security

See Also

Reference

XmlMappedRange Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace