Set the nColUserSortIndicator parameter to specify the sort method:
If you want to sort in ascending order, set the property to 1 (SS_COLUSERSORTINDICATOR_ASCENDING).
If you want to sort in descending order, set the property to 2 (SS_COLUSERSORTINDICATOR_DESCENDING).
Call the SSSetUserColAction function and set the nUserColAction parameter as follows:
If you want the column to be sorted and display the sort indicator, set the nUserColAction parameter to 1 (SS_USERCOLACTION_SORT).
If you want the column to be sorted and not display the sort indicator, set the nUserColAction parameter to 2 (SS_USERCOLACTION_SORTNOINDICATOR).
If your sheet displays multiple headers and you want the sort indicator to display in a row other than the bottom-most header row, specify which column header row will display the indicator by calling the SSSetColHeadersUserSortIndex function.