ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   2000 vs. 2003 (https://www.excelbanter.com/excel-programming/373556-2000-vs-2003-a.html)

Bill G[_4_]

2000 vs. 2003
 
Is there a good resource that reviews any basic differences between Excel
VBA programming in 2000 vs. 2003?

It'd appear that there are some diifferences that cause some work I've done
in 2003 (1/3 recorded, 1/3 recorded & edited, 1/3 straight entry) to bomb
when run in 2000.

In the example below, 2003 records the last 3 DataOption arguments. Removed
(the feature's not in 2000 and doesn't get recorded), the sub runs fine:

Range("A11:K65").Sort Key1:=Range("A12"), Order1:=xlAscending, Key2:= _
Range("B12"), Order2:=xlAscending, Key3:=Range("G12"), Order3:= _
xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=
_
xlSortNormal, DataOption3:=xlSortNormal

I figureed this one out myself & have since read where others have asked
about this. Are there other land mines out there?



Dave Peterson

2000 vs. 2003
 
You're right: DataOption1, DataOption2, and DataOption3 were added in xl2002.

I don't know of any definitive resource--xl2002 does have a "what's new" in it's
help--and so does xl2003.

If you have to support various versions of excel, it's usually much better to
develop in the oldest version of excel.

Bill G wrote:

Is there a good resource that reviews any basic differences between Excel
VBA programming in 2000 vs. 2003?

It'd appear that there are some diifferences that cause some work I've done
in 2003 (1/3 recorded, 1/3 recorded & edited, 1/3 straight entry) to bomb
when run in 2000.

In the example below, 2003 records the last 3 DataOption arguments. Removed
(the feature's not in 2000 and doesn't get recorded), the sub runs fine:

Range("A11:K65").Sort Key1:=Range("A12"), Order1:=xlAscending, Key2:= _
Range("B12"), Order2:=xlAscending, Key3:=Range("G12"), Order3:= _
xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=
_
xlSortNormal, DataOption3:=xlSortNormal

I figureed this one out myself & have since read where others have asked
about this. Are there other land mines out there?


--

Dave Peterson


All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com