Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can anyone tell me why this code fails in Excel 2003 (works fine in Excel 2007)
I get the following error: object doesn't support this property or method and the line ActiveSheet.Sort.SortFields.Clear is highlighted Sub Sort_NoneReturned() ' ' ' Application.EnableEvents = False Application.ScreenUpdating = False ActiveSheet.Sort.SortFields.Clear ActiveSheet.Sort.SortFields.Add Key:=Range( _ "O3:O5000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ xlSortNormal With ActiveSheet.Sort .SetRange Range("A2:O5000") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Range("B2").Select Application.EnableEvents = False Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to sort variable data range fails | Excel Discussion (Misc queries) | |||
Sort fails on one column | Excel Discussion (Misc queries) | |||
My code fails | Excel Programming | |||
Code fails if ran more than once | Excel Programming | |||
In Excel, why sort function fails when applied to a list of date? | Excel Discussion (Misc queries) |