Share via


XmlMappedRange.Previous Property (2007 System)

Gets a Range that represents the previous cell.

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 Previous As Range
'Usage
Dim instance As XmlMappedRange 
Dim value As Range 

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

Property Value

Type: 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 Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace