I am getting a with block error when it sorts my sheet based on cell color. I can not figure out where to put the with to get to stop erroring out. Can someone please help look at my code and see whats wrong with it. I have also used macros to assist and im still getting this error.
Sub Color_Conditions()
'
' Color_Conditions Macro
'
Sheets("Skill RAW DATA").Range("A:BZ").Columns.Select
Selection.AutoFilter
ActiveWorkbook.Worksheets("Skill RAW DATA").AutoFilter.Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Skill RAW DATA").AutoFilter.Sort.SortFields.Add2 _
Key:=Range("B1:B5000"), SortOn:=xlSortOnCellColor, Order:=xlAscending, _
DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Skill RAW DATA").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub