Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting problem
Any idea why the following runs on laptop with XL 2002 but not on desktop
with XL 2000. It is in a subroutine called by another. The sub does not start but throws up the comment 'Named argument cannot be found' and 'DataOption1' is highlighted? Range("A1:D" & iCount).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal Francis Hookham |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting problem
Remove this portion: ", DataOption1:=xlSortNormal"
This option was added in xl2002. Francis Hookham wrote: Any idea why the following runs on laptop with XL 2002 but not on desktop with XL 2000. It is in a subroutine called by another. The sub does not start but throws up the comment 'Named argument cannot be found' and 'DataOption1' is highlighted? Range("A1:D" & iCount).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal Francis Hookham -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting problem
Francis,
The 'DataOption1' sort option was added with Excel 2002. It is not recognized by earlier versions. When you are working with multiple versions of Excel, you must be sure you code for the earliest version. Otherwise, as you have seen, the code may not work. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Francis Hookham" wrote in message ... Any idea why the following runs on laptop with XL 2002 but not on desktop with XL 2000. It is in a subroutine called by another. The sub does not start but throws up the comment 'Named argument cannot be found' and 'DataOption1' is highlighted? Range("A1:D" & iCount).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal Francis Hookham |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sorting problem
Many thanks Chip and Dave
I do most of the programming in 2002 on the Laptop (it is newer and much faster!) but, now I understand the problem I'll remove similar offending code if it occurs and chack the macro still runs correctly. Francis "Chip Pearson" wrote in message ... Francis, The 'DataOption1' sort option was added with Excel 2002. It is not recognized by earlier versions. When you are working with multiple versions of Excel, you must be sure you code for the earliest version. Otherwise, as you have seen, the code may not work. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Francis Hookham" wrote in message ... Any idea why the following runs on laptop with XL 2002 but not on desktop with XL 2000. It is in a subroutine called by another. The sub does not start but throws up the comment 'Named argument cannot be found' and 'DataOption1' is highlighted? Range("A1:D" & iCount).Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal Francis Hookham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sorting VBA problem | Excel Discussion (Misc queries) | |||
sorting problem | Excel Programming | |||
Sorting problem | Excel Worksheet Functions | |||
Sorting problem | Excel Programming | |||
Sorting problem | Excel Programming |