SortFields.Add Method
Creates a new sort field and returns a SortField object.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Add ( _
Key As Range, _
SortOn As Object, _
Order As Object, _
CustomOrder As Object, _
DataOption As Object _
) As SortField
'Usage
Dim instance As SortFields
Dim Key As Range
Dim SortOn As Object
Dim Order As Object
Dim CustomOrder As Object
Dim DataOption As Object
Dim returnValue As SortField
returnValue = instance.Add(Key, SortOn, _
Order, CustomOrder, DataOption)
SortField Add(
Range Key,
Object SortOn,
Object Order,
Object CustomOrder,
Object DataOption
)
Parameters
Key
Type: Microsoft.Office.Interop.Excel.RangeSpecifies a key value for the sort.
SortOn
Type: System.ObjectThe field to sort on.
Order
Type: System.ObjectSpecifies the sort order.
CustomOrder
Type: System.ObjectSpecifies if a custom sort order should be used.
DataOption
Type: System.ObjectSpecifies the data option.
Return Value
Type: Microsoft.Office.Interop.Excel.SortField
SortField