Is there some sort of problem with sorting for Excel VBA for Office 365.
I have been using this VBA for years. It works in Office 2010 in a citrix environment. It worked in office 2010 on my windows 7 pc, then I upgraded to Office 365 on the windows 7 machine and it worked. Finally I got a new Windows 10 machine
and installed office 365 and it does not work. I also tried to record a new macro but that also seems to produce bad code.
Application.GoTo Reference:="ManualAssignedJEs"
ActiveWorkbook.Worksheets("JEsManualAssigned").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("JEsManualAssigned").Sort.SortFields.Add Key:=Range _
("A:A"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets("JEsManualAssigned").Sort.SortFields.Add Key:=Range _
("C:C"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
ActiveWorkbook.Worksheets("JEsManualAssigned").Sort.SortFields.Add Key:=Range _
("AK:AK"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets("JEsManualAssigned").Sort.SortFields.Add Key:=Range _
("AP:AP"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets("JEsManualAssigned").Sort.SortFields.Add Key:=Range _
("AS:AS"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("JEsManualAssigned").Sort
.SetRange Range("ManualAssignedJEs")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With