Class Sort (Excel VBA)

The class Sort represents a sort of a range of data.

Apply

Sorts the range based on the currently applied sort states.

Header

Specifies whether the first row contains header information.

Possible Values are xlGuess - Excel determines whether there is a header, and where it is, if there is one, xlNo - Default. The entire range should be sorted, xlYes - The entire range should not be sorted.

xlNo is the default value. You can specify xlGuess if you want Excel to attempt to determine the header.

MatchCase

Set to True to perform a case-sensitive sort, or set to False to perform a non-case-sensitive sort.

Orientation

Specifies the orientation for the sort.

Possible Values are xlSortRows - Sorts by row. This is the default value, xlSortColumns - Sorts by column.

Parent

Returns the parent object for the specified object. Read-only.

Rng

Return the range of values on which the sort is performed.

SetRange

Sets the range over which the sort occurs.

Syntax : expression.SetRange (Rng)

Rng: Specifies the range over which the sort represented by the Sort object occurs.

SortFields

Returns the SortFields object that represents the collection of sort fields associated with the Sort object.

SortMethod

Specifies the sort method for Chinese languages.

Possible Values are xlPinYin - Phonetic Chinese sort order for characters. This is the default value, xlStroke - Sort by the quantity of strokes in each character.