I have this code and if run the same on 2016 then its gives error as Run-time error 438 object don't support this property, if the same is running in office 365, any way to fix it
I am trying it for more than 2 hrs but no luck.
I am trying it for more than 2 hrs but no luck.
VBA Code:
ActiveSheet.AutoFilterMode = False
Range("CP1").Select
n = Worksheets("WFMS-Dump").Cells(Rows.Count, 2).End(xlUp).Row
Selection.AutoFilter
[B]ActiveWorkbook.Worksheets("WFMS-Dump").Sort.SortFields.Add2 Key:=Range(Cells(2, 94), Cells(n, 94)), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal[/B] 'Run-time error 438 object don't support this property
With ActiveWorkbook.Worksheets("WFMS-Dump").Sort
.SetRange Range(Cells(1, 1), Cells(n, 94))
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With