I'm trying to adapt an xla add-in that I wrote for Excel 2007 to work in Excel 2003. I have most of the issues sorted, but I'm having trouble finding a way to sort fields in a sheet. I have rows of data which need to be sorted in order of creation date (the value of which is in column H). Here's the Excel 2007 code I was using:
'sort issues into descending order
Sheets("In Progress").Sort.SortFields.Clear
Sheets("In Progress").Sort.SortFields.Add _
Key:=Range("H:H"), _
SortOn:=xlSortOnValues, _
Order:=xlDescending, _
DataOption:=xlSortNormal
With Sheets("In Progress").Sort
.SetRange Range("A2:M" & rowCount - 1)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Can anybody help me to get this to work with Excel 2003?