Partager via


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

  • CustomOrder
    Type: System.Object

    Specifies if a custom sort order should be used.

Return Value

Type: Microsoft.Office.Interop.Excel.SortField
SortField

See Also

Reference

SortFields Interface

SortFields Members

Microsoft.Office.Interop.Excel Namespace