ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Excel 2000 issue (https://www.excelbanter.com/excel-programming/316846-vba-excel-2000-issue.html)

dan

VBA Excel 2000 issue
 
My code and program were written in Excel 2003 and
everything works fine. My Excel 2000 users report a run
time error 1004 when they exceute my code. When I have
them push the "Debug" button they are taken to my Sort
History macro where the "Selection..." section is
highlighted, code attached below. Since Excel 2003 does
not generate the error can you help me ID the error and a
corrective action. Thanks.

Sub SortHistory()
Sheets("Concern History").Select
Range("A2:AK25000").Select

'Debugging brings me to this point to DEBUG

Selection.Sort Key1:=Range("A2"),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A2").Select

End Sub


Doug Glancy

VBA Excel 2000 issue
 
Dan,

From looking at help in 2000, I don't believe Sort has a "DataOption1"
parameter in that version. Try removing it.

hth,

Doug Glancy

"Dan" wrote in message
...
My code and program were written in Excel 2003 and
everything works fine. My Excel 2000 users report a run
time error 1004 when they exceute my code. When I have
them push the "Debug" button they are taken to my Sort
History macro where the "Selection..." section is
highlighted, code attached below. Since Excel 2003 does
not generate the error can you help me ID the error and a
corrective action. Thanks.

Sub SortHistory()
Sheets("Concern History").Select
Range("A2:AK25000").Select

'Debugging brings me to this point to DEBUG

Selection.Sort Key1:=Range("A2"),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A2").Select

End Sub




No Name

VBA Excel 2000 issue
 
hi,
re-write the code for xl2k IN xl2k.
it is not wise to write code in a higher version and
expect it to run in lower version. many times there are no
problems but sometimes there are. developers try to make
thier software backwards compatable but few can make it
forward compatable.

-----Original Message-----
My code and program were written in Excel 2003 and
everything works fine. My Excel 2000 users report a run
time error 1004 when they exceute my code. When I have
them push the "Debug" button they are taken to my Sort
History macro where the "Selection..." section is
highlighted, code attached below. Since Excel 2003 does
not generate the error can you help me ID the error and a
corrective action. Thanks.

Sub SortHistory()
Sheets("Concern History").Select
Range("A2:AK25000").Select

'Debugging brings me to this point to DEBUG

Selection.Sort Key1:=Range("A2"),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A2").Select

End Sub

.


No Name

VBA Excel 2000 issue
 
hi again,
forgot an options
Upgrade users to xl2003

-----Original Message-----
hi,
re-write the code for xl2k IN xl2k.
it is not wise to write code in a higher version and
expect it to run in lower version. many times there are

no
problems but sometimes there are. developers try to make
thier software backwards compatable but few can make it
forward compatable.

-----Original Message-----
My code and program were written in Excel 2003 and
everything works fine. My Excel 2000 users report a run
time error 1004 when they exceute my code. When I have
them push the "Debug" button they are taken to my Sort
History macro where the "Selection..." section is
highlighted, code attached below. Since Excel 2003 does
not generate the error can you help me ID the error and

a
corrective action. Thanks.

Sub SortHistory()
Sheets("Concern History").Select
Range("A2:AK25000").Select

'Debugging brings me to this point to DEBUG

Selection.Sort Key1:=Range("A2"),
Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A2").Select

End Sub

.

.



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

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