View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Doug Glancy Doug Glancy is offline
external usenet poster
 
Posts: 770
Default 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