Scenario:

I want to sort a mshflexgrid within a specified range of rows, which is everything but the last row. The last row of the grid, I am using for the totals and therefore do not want to sort. I am sorting using the last column which is the total for each row.

mshflexgrid.row = 1 'Begin Row selection
mshflexgrid.rowsel = mshflexgrid.rows-2 'End row selection
mshflexgrid.col = mshflexgrid.cols-1 'selected column
mshflexgrid.sort = flexSortNumericDescending

What I am getting:

The flexgrid gets sorted but the last total row gets sorted as well and because it is the total and has the highest number, it is placed on the top.

What I am looking for:

I want not to sort the last row of the flex.

Thanks in advance,