Sort Excel using color

vdennis

Member
Good afternoon all.
I have used the sorting method for a single sort, but now I have need to sort first by CellColor, (or lack thereof,) and then product number. The following short code works for descending product number.
hWorksheet:range("A2:Z051834"):sort(
hWorkSheet:range("G2"),
1,
,
,
,
,
,
,
,
,
,
,
,
,
).

But in looking at the VB code, the '1' should sort by color if it is the first value after the 'key' .The first option after the key is set in VB is the SortOnCellColor option. (SortOn:xlSortOnCellColor). So what am I missing:

Thanks to any who read this.
-Dennis-
 
Top