Version

ResetSelection(String,String,Int32,Boolean) Method

Clears the current selection and uses the specified information to reinitialize the selection.
Syntax
'Declaration
 
Public Overloads Function ResetSelection( _
   ByVal rangesAddress As String, _
   ByVal activeCellAddress As String, _
   ByVal newActiveRangeIndex As Integer, _
   Optional ByVal extendRangeForMergedCells As Boolean _
) As Boolean

Parameters

rangesAddress
The new selection ranges. There must be 1 or more ranges.
activeCellAddress
The cell to use for the ActiveCell. This must be within the specified rangesAddress.
newActiveRangeIndex
The index of the range that contains the active cell.
extendRangeForMergedCells
True to adjust the rangesAddress such that it contains any intersecting merged cells; otherwise false to use the range as it is.
Exceptions
ExceptionDescription
System.ArgumentExceptionThe rangesAddress must contain at least 1 cell/range.
System.ArgumentOutOfRangeExceptionThe newActiveRangeIndex must be an index within the specified rangesAddress.
System.ArgumentExceptionThe activeCellAddress must be within the range index specified by the newActiveRangeIndex.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also