XmlMappedRange.DirectPrecedents Property (2007 System)
Gets a Range that represents the range containing all the direct precedents of an 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 DirectPrecedents As Range
'Usage
Dim instance As XmlMappedRange
Dim value As Range
value = instance.DirectPrecedents
[BrowsableAttribute(false)]
public Range DirectPrecedents { get; }
[BrowsableAttribute(false)]
public:
property Range^ DirectPrecedents {
Range^ get ();
}
public function get DirectPrecedents () : Range
Property Value
Type: Range
A Range that represents the range containing all the direct precedents of an XmlMappedRange control.
Remarks
This property only works on the active sheet and cannot trace remote references.
Examples
The following code example sets a reference in cell A2 to refer to cell A1, and then sets a reference in an XmlMappedRange to refer to cell A2. The code example then uses the DirectPrecedents property to select the direct precedent of the XmlMappedRange, which is cell A2. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerAddress1Cell with a corresponding schema element of type int.
Private Sub SelectDirectPrecedents()
Me.Range("A1").Value2 = 1710
Me.Range("A2").Value2 = "=A1"
Me.CustomerAddress1Cell.Value2 = "=A2"
Me.CustomerAddress1Cell.DirectPrecedents.Select()
End Sub
private void SelectDirectPrecedents()
{
this.Range["A1", missing].Value2 = 1710;
this.Range["A2", missing].Value2 = "=A1";
this.CustomerAddress1Cell.Value2 = "=A2";
this.CustomerAddress1Cell.DirectPrecedents.Select();
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.