excel vba sort by color and then values
<p>I've been trying to adapt another answer to my situation and I can't get it to work. I'm trying to sort by the color of one cell (they are either no color or one specific color), and then by the value in a second cells. Here's my code:</p>

<pre><code>Application.ScreenUpdating = False
xL.Sheets(sheet).Sort.SortFields.Clear
xL.Sheets(sheet).Sort.SortFields.Add(Range("B1:B" + CStr(rowCount)), _
        xlSortOnCellColor, xlAscending, , xlSortNormal).SortOnValue.Color = RGB(216, 228, 188)
xL.Sheets(sheet).Sort.SortFields.Add Range("H1:H" + CStr(rowCount)), _
        xlSortOnValues, xlDescending, , xlSortNormal
With xL.Sheets(sheet).Sort
    .SetRange ("A1:M" + Trim(Str(rowCount)))
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .Apply
End With
Application.ScreenUpdating = True
</code></pre>

<p>When I run, I get the following error: Run-time error '-2147417851 (80010105)': Method 'Add' of object 'SortFields' failed. It is happening on the first ".SortFields.Add". Can anyone see what I'm doing wrong? Thanks!</p>