Key:=source.Range(source.Cells(rowStart, startNames)...– You shouldn’t havesource.Rangehere – your key is the single cellsource.Cells(rowStart, startNames).- As a recommendation – change
...SortFields.Add2to...SortFields.Add. The..Add2will definitely not work in older versions of Excel.
solved Excel VBA sort bug