XmlMappedRange.Offset Property (2007 System)
Gets a Range that is offset from 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 Offset As XmlMappedRange._OffsetType
'Usage
Dim instance As XmlMappedRange
Dim value As XmlMappedRange._OffsetType
value = instance.Offset
[BrowsableAttribute(false)]
public XmlMappedRange._OffsetType Offset { get; }
[BrowsableAttribute(false)]
public:
property XmlMappedRange._OffsetType^ Offset {
XmlMappedRange._OffsetType^ get ();
}
public function get Offset () : XmlMappedRange._OffsetType
Property Value
Type: Microsoft.Office.Tools.Excel.XmlMappedRange._OffsetType
A Range that is offset from the XmlMappedRange control.
Remarks
The Offset property is intended to be used with the following parameters.
Parameter |
Description |
---|---|
RowOffset |
The number of rows (positive, negative, or 0 (zero)) by which the range is to be offset. Positive values are offset downward, and negative values are offset upward. The default value is 0. |
ColumnOffset |
The number of columns (positive, negative, or 0 (zero)) by which the range is to be offset. Positive values are offset to the right, and negative values are offset to the left. The default value is 0. |
If you attempt to use Offset without specifying any parameters, Offset will get an XmlMappedRange._OffsetType object that is part of the Visual Studio Tools for Office infrastructure and is not intended to be used directly from your code.
Optional Parameters
For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.
Examples
The following code example uses the Offset property to select a range that is offset from an XmlMappedRange by three cells to the right and three cells down. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.
Private Sub ActivateOffset()
Dim offsetRange As Excel.Range = _
CType(Me.CustomerLastNameCell.Offset(3, 3), Excel.Range)
offsetRange.Value2 = "Offset range."
offsetRange.Select()
End Sub
private void ActivateOffset()
{
Excel.Range offsetRange =
(Excel.Range)this.CustomerLastNameCell.Offset[3, 3];
offsetRange.Value2 = "Offset range.";
offsetRange.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.