![]() |
Compatibility with older versions of Excel
Can use some help here.
I wrote a macro in Excel 2002....I tried to run it on Excel 2000 and had problems. Specifically I have this sorting command as follows: Range(Cells(4, 1), Cells(endrow, 10)).Sort Key1:=Range("D4"), Order1:=xlAscending, Key2:=Range( _ "E4"), Order2:=xlAscending, Key3:=Range("C4"), Order3:=xlDescending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal Fine in 2002, but 2000 does not like the DataOption1: argument. Any help will be welcome. Thanks Chuck |
Compatibility with older versions of Excel
Hi Chuck
Delete everything after xlTopToBottom and hope that it will sort normal anyway. I think it will. -- HTH. Best wishes Harald Followup to newsgroup only please. "ChuckM" wrote in message m... Can use some help here. I wrote a macro in Excel 2002....I tried to run it on Excel 2000 and had problems. Specifically I have this sorting command as follows: Range(Cells(4, 1), Cells(endrow, 10)).Sort Key1:=Range("D4"), Order1:=xlAscending, Key2:=Range( _ "E4"), Order2:=xlAscending, Key3:=Range("C4"), Order3:=xlDescending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal Fine in 2002, but 2000 does not like the DataOption1: argument. Any help will be welcome. Thanks Chuck |
Compatibility with older versions of Excel
Remove the last 3 options (dataoptionx:= ) since they were not added until
version 2002. You aren't using them, so you don't need them in either version. -- Regards, Tom Ogilvy ChuckM wrote in message m... Can use some help here. I wrote a macro in Excel 2002....I tried to run it on Excel 2000 and had problems. Specifically I have this sorting command as follows: Range(Cells(4, 1), Cells(endrow, 10)).Sort Key1:=Range("D4"), Order1:=xlAscending, Key2:=Range( _ "E4"), Order2:=xlAscending, Key3:=Range("C4"), Order3:=xlDescending, _ Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _ xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _ DataOption3:=xlSortNormal Fine in 2002, but 2000 does not like the DataOption1: argument. Any help will be welcome. Thanks Chuck |
All times are GMT +1. The time now is 01:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com