sort by font colour black at bottom

Hi Experts,

Could you please suggest me where I am wrong regarding the below recorded vba code. the below code is to sort data by black colour at bottom. By doing it manually its works perfectly , however by recording not getting the desired results. Please help.

Sub Macro2()
'
' Macro2 Macro
'

'
'Columns("A:E").Select
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add(Range("A2:A22"), _
xlSortOnFontColor, xlDescending, , xlSortNormal).SortOnValue.Color = RGB(0, 0, 0)

With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A1:E22")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub

Hi everything is right about

Hi everything is right about running this macro. I am running this code in sheet1, however not able to get desired results. any help is greatly appreciated. thanks in advance.

The macro is quite dependent

The macro is quite dependent on having the correct sheet selected when you run it - are you definitely running it with the right sheet active?

Chris

Hi everything is right about

Hi everything is right about running this macro. I am running this code in sheet1, however not able to get desired results. any help is greatly appreciated. thanks in advance.