SortFields.Add(Range, Object, Object, Object, Object) SortFields.Add(Range, Object, Object, Object, Object) Method

Definition

Creates a new sort field and returns a SortField object.

public Microsoft.Office.Interop.Excel.SortField Add (Microsoft.Office.Interop.Excel.Range Key, object SortOn, object Order, object CustomOrder, object DataOption);
Public Function Add (Key As Range, Optional SortOn As Object, Optional Order As Object, Optional CustomOrder As Object, Optional DataOption As Object) As SortField
Parameters
Key
Range Range

Specifies a key value for the sort.

SortOn
Object Object

The field to sort on.

Order
Object Object

Specifies the sort order.

CustomOrder
Object Object

Specifies if a custom sort order should be used.

DataOption
Object Object

Specifies the data option.

Returns

Applies to