I'm trying to write a code that will remove duplicates from my list.
It worked well on my mac, but when I tried to run it on windows I got the runtime error 438:
object doesn't support this property or method.
What went wrong?
Range("E2:E150").Select
 ActiveWorkbook.Worksheets("NOS").Sort.SortFields.Clear
 ActiveWorkbook.Worksheets("NOS").Sort.SortFields.Add2 Key:=Range("E2"), _
    SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
 With ActiveWorkbook.Worksheets("NOS").Sort
    .SetRange Range("E2:G150")
    .Header = xlNo
    .MatchCase = False
    .Orientation = xlTopToBottom
    .Apply
 End With
Range("E1").Select
End Sub
 
    