Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 sucks. Older versions are much better. Mike M[_2_] Charts and Charting in Excel 2 November 27th 08 05:35 PM
Older Versions of Excel excel help Excel Discussion (Misc queries) 1 September 22nd 08 12:26 AM
Converting Excel 07 to older versions SNS Excel Discussion (Misc queries) 4 September 24th 07 12:43 PM
Older versions of Excel Launchnet Excel Discussion (Misc queries) 5 August 6th 07 03:50 PM
Office 07 opening older versions in compatibility mode-min/maximiz Eric Dimbleby Excel Discussion (Misc queries) 0 June 11th 07 03:49 PM


All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"