XmlMappedRange.Previous Property

Gets a Range that represents the previous cell.

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

Syntax

'Declaration
ReadOnly Property Previous As Range
    Get
Range Previous { get; }

Property Value

Type: Microsoft.Office.Interop.Excel.Range
A Range that represents the previous cell.

Remarks

This property emulates pressing SHIFT+TAB; unlike the key combination, however, the property returns the previous cell without selecting it.

On a protected sheet, this property returns the previous unlocked cell. On an unprotected sheet, this property always returns the cell immediately to the left of the specified cell.

Examples

The following code example uses the Previous property to select the cell to the left of an XmlMappedRange. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

Private Sub SelectPrevious()
    Me.CustomerLastNameCell.Previous.Select()
End Sub
private void SelectPrevious()
{
    this.CustomerLastNameCell.Previous.Select();
}

.NET Framework Security

See Also

Reference

XmlMappedRange Interface

Microsoft.Office.Tools.Excel Namespace