Sorts a range of cells in the data model.
Syntax
'Declaration
Public Function Sort( _
ByVal As Integer, _
ByVal column As Integer, _
ByVal As Integer, _
ByVal columnCount As Integer, _
ByVal As Boolean, _
ByVal () As SortInfo _
) As Boolean
'Usage
Dim instance As SheetView
Dim row As Integer
Dim column As Integer
Dim rowCount As Integer
Dim columnCount As Integer
Dim byRows As Boolean
Dim sortInfo() As SortInfo
Dim value As Boolean
value = instance.Sort(row, column, rowCount, columnCount, byRows, sortInfo)
Parameters
- row
- Starting sheet row index
- column
- Starting sheet column index
- rowCount
- Number of rows in the sheet to sort
- columnCount
- Number of columns in the sheet to sort
- byRows
- Whether the sort should move rows in the range (true) or columns in the range (false)
- sortInfo
- Array of SortInfo objects containing the column indexes (if byRows is true) or row indexes (if byRows is false) and the order of sorting
See Also