The same as Sort but takes a variant holding the MoreColsAndSortTypes values. Used to pass in code-constructed arrays or ParamArrays from external functions.
The column index or name of the first column to sort
True to sort ascending, False to sort descending
A list of pairs of column index or name and True/False values, indicating sort settings for additional columns. The array is passed in as a variant.
Public Sub MyCustomSort(FirstColNameorIndex As Variant, SortAsc As Boolean, ParamArray MoreColsAndSortTypes() As Variant) Dim tmpArr As Variant tmpArr = MoreColsAndSortTypes() SortInternal FirstColNameorIndex, SortAsc, tmpArr End Sub