ListBox.ColumnSortDirection Property
Syntax
ColumnSortDirection as Integer
Parameter is columnNumber ( Integer). The first column is numbered zero.
Used to get or set the sort direction, according to the following class constants:
SortDescending (-1): Descending
SortNone (0): Don't sort
SortAscending (1): Ascending (default)
For example:
lb1.ColumnSortDirection(2)=ListBox.SortDescending
ColumnSortDirection doesn't actually sort the rows; it only establishes the sort direction that is used when the Sort method is called. The sort direction can be set even if there is no header for the ListBox.
If you set ColumnSortDirection to Don't Sort, the user can't sort the column by clicking its header. Don't Sort will block the usual calls to the SortColumn and CompareRows events.