XmlMappedRange.DirectDependents Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Range that represents the range containing all the direct dependents of an XmlMappedRange control.
public:
property Microsoft::Office::Interop::Excel::Range ^ DirectDependents { Microsoft::Office::Interop::Excel::Range ^ get(); };
public Microsoft.Office.Interop.Excel.Range DirectDependents { get; }
member this.DirectDependents : Microsoft.Office.Interop.Excel.Range
Public ReadOnly Property DirectDependents As Range
Property Value
A Range that represents the range containing all the direct dependents of an XmlMappedRange control.
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 DirectDependents property to select the direct dependent of the XmlMappedRange, which is cell A1. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell
.
private void SelectDirectDependents()
{
this.CustomerLastNameCell.Value2 = "Smith";
this.Range["A1"].Value2 = "=" +
this.CustomerLastNameCell.Address[false, true,
Excel.XlReferenceStyle.xlA1, false];
this.Range["A2"].Value2 = "=A1";
this.CustomerLastNameCell.DirectDependents.Select();
}
Private Sub SelectDirectDependents()
Me.CustomerLastNameCell.Value2 = "Smith"
Me.Range("A1").Value2 = "=" & Me.CustomerLastNameCell.Address( _
False, True, Excel.XlReferenceStyle.xlA1, False)
Me.Range("A2").Value2 = "=A1"
Me.CustomerLastNameCell.DirectDependents.Select()
End Sub
Remarks
This can be a multiple selection (a union of Range objects) if there is more than one dependent.
The DirectDependents property only works on the active sheet and cannot trace remote references.