Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems using Excel Sort Method
Message
From
19/07/2000 14:00:58
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/07/2000 13:50:38
Jared Anderson
Marketing Support Solutions, Inc.
Forest, Virginia, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00394423
Message ID:
00394431
Views:
10
>Hello all.
>
>I'm running into a strange problem trying to use Excel (97) Sort Method.
>
>The (corrected) syntax is as follows:
>
>Sort([Key1],[Order1],[Type],[Key2],[Order2],[Key3],[Order3],[Header],[OrderCustom],[Matchcase],[Orientation],[SortMethod])
>
>I have a variable, nBottom, which holds the row number of the bottom of the range-to-be-sorted on a worksheet, oRecord. I am sorting columns A through N, starting with row 2 [Row 1 contains headers ... I have tried the same statement including Row 1 in the range and simply specifying that there ARE headers, and I get the same error.]
>
>My line is:
>
>oRecord.Range("A2:N"+ALLTRIM(STR(nBottom))).Sort(oRecord.Range("A2"), xlAscending, , ;
>oRecord.Range("B1"), xlAscending, oRecord.Range("C2"), xlAscending, xlNo, 1, ;
>.F., xlTopToBottom)
>
>I do not get an error when I save my class code or build my PRG. When the app is actually running, FoxPro shoots up an error that just says "Syntax Error", and this is the line that it halts on.
>
>Any ideas??
>
>I've checked this against the recorded-macro-code for doing the same thing (without the use of "nBottom" of course), and everything SEEMS to match up! Is this a bug for which I just am not happening to stumble across the documentation? I've found some for some others (such as the incorrect ordering of the parameters, the corrected listing of which I've used above).
>
>Thanks so much!


Is it a typo - semicolon after xlAscending,,
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform