I am using a special sort to sort multiple columns in a spreadsheet, in this case- 3. However, the SetRange and the code below it seems to be gettings an error of "Object doesn't support this property or method."
if I take away the With statement I have a different error of "Invalid or unqualified sequence."
the line that is highlighted is .SetRange Range("A1:I35") and the error is 438 Object doesnt support this property or method
How do I proceed in fixing this error?
Sub Sort()
With ActiveSheet
' Sort Macro
Cells.Select
ActiveSheet.Sort.SortFields.Clear
ActiveSheet.Sort.SortFields.Add2 Key:=Range("A2:A35" _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveSheet.Sort.SortFields.Add2 Key:=Range("B2:B35" _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveSheet.Sort.SortFields.Add2 Key:=Range("H2:H35" _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Range("A1:I35")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub