LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Use Sort method for 2002/2003 in 2000.

Hi there ,

The options for the Sort method for Ms excel 2000 and MsExcel 2002/2003 are
slightly different.
The differences are the dataoptions in 2002.
I used both sort methods in the same application , but when i run it in
Excel 2000 i get an error .
Error on "xlSortTextasNumbers"
I would like the apllication i'm building to be used on Excel2000 and Excel
2002 / 2003 and sort the data , even if it's another version of Excel.
To verify which Excel the user is using i capture the application.version
value

Is there a way to do this ?
Any suggestion is welcome
Thanks
MarMo

This is the code i'm using :
'declare variable
Public AppVer
-----------------------
Sub SortOutCustomersNbrs()
AppVer = Application.Version
Application.ScreenUpdating = False
Sheets("Clients").Activate
If AppVer < 10 Then
Worksheets("Clients").Range("A1").Sort _
Key1:=Worksheets("Clients").Columns("A"), Order1:=xlAscending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom
Else
Worksheets("Clients").Range("A1").Sort _
Key1:=Worksheets("Clients").Columns("A"), _
Header:=xlYes, DataOption1:=xlSortTextAsNumbers
End If
Range("A1").Select
Sheets("Start").Activate
Range("A15").Select
Application.ScreenUpdating = True
End Sub


 
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
Error in Excel 2000, but not 2002 and 2003 Ctech[_132_] Excel Programming 1 April 3rd 06 12:44 PM
Hiding rows - Excel 2000, 2002 vs 2003 Martin[_21_] Excel Programming 2 October 2nd 05 04:36 PM
Charts not updating in 2002,2003 but working in 2000 Richard Bond[_2_] Excel Programming 4 August 28th 05 04:20 AM
Using OWC VBA programs in excel 2000/2002/2003 [email protected] Excel Programming 0 August 23rd 05 10:04 AM
VBA and 2002/2003/2000 Bill Sturdevant[_2_] Excel Programming 3 April 20th 05 03:24 PM


All times are GMT +1. The time now is 09:03 AM.

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"