Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a sorting macro that runs on a machine with Excel 2003 but won't run
on Excel 2000. I used the macro recorder to record the macro but it won't run on the machine with Excel 2000. Is there some change I could make to the sorting routine that would make it compatible with both versions of Excel? The line between the asterisks below is the one that stops during execution of the macro. Range("M3:N122").Select ' Select all records in list to sort **** Selection.Sort Key1:=Range("N3"), Order1:=xlAscending, Header:=xlGuess,OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal **** Also, do I need all those variables in the macro... like Header MatchCase, Orientation...etc. All I ewant it to do is sort alphabetically on the contents in column N . Any help would be appreciated. Jonco |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jonco,
The DataOption1 argument is not available in xl2k, so try changing your code to: Selection.Sort Key1:=Range("N3"), _ Order1:=xlAscending, _ Header:=xlGuess, OrderCustom:=1, _ MatchCase:=False, _ Orientation:=xlTopToBottom --- Regards, Norman "jonco" wrote in message . com... I have a sorting macro that runs on a machine with Excel 2003 but won't run on Excel 2000. I used the macro recorder to record the macro but it won't run on the machine with Excel 2000. Is there some change I could make to the sorting routine that would make it compatible with both versions of Excel? The line between the asterisks below is the one that stops during execution of the macro. Range("M3:N122").Select ' Select all records in list to sort **** Selection.Sort Key1:=Range("N3"), Order1:=xlAscending, Header:=xlGuess,OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal **** Also, do I need all those variables in the macro... like Header MatchCase, Orientation...etc. All I ewant it to do is sort alphabetically on the contents in column N . Any help would be appreciated. Jonco |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sorting problem | Excel Discussion (Misc queries) | |||
Sorting problem . . . | Excel Discussion (Misc queries) | |||
Sorting problem | Excel Discussion (Misc queries) | |||
Sticky sorting/macro/VLOOKUP problem | Excel Discussion (Misc queries) | |||
Sorting problem | Excel Programming |