Edit

Share via


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

Specifies a key value for the sort.

SortOn
Object

The field to sort on.

Order
Object

Specifies the sort order.

CustomOrder
Object

Specifies if a custom sort order should be used.

DataOption
Object

Specifies the data option.

Returns

SortField

Applies to