Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems using Excel Sort Method
Message
From
20/07/2000 03:44:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/07/2000 15:49:40
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:
00394779
Views:
15
>The syntax for Excel(97)'s Sort Method is:
>
>Sort([Key1],[Order1],[Type],[Key2],[Order2],[Key3],[Order3],[Header],[OrderCustom],[Matchcase],[Orientation],[SortMethod])
>
>It was the "Type" parameter I was leaving out, that's why there is just the 'double-comma' there. I normally don't have any trouble with 'omitting' parameters this way in FoxPro, and when working in Excel directly with VB/VBA, you can omit them that way too.
>
>BUT, thank you for drawing my attention to it anyway, BECAUSE: it happened to make me think that I had not, in this case, tried passing "" instead of not passing anything at all. I guess there is some sort of issue in the Automation "translation" between FoxPro and Excel when it comes to empty parameters?
>
>So, even though it should have worked, it didn't. Adding in "" took care of it :)
>
>Thank you!!


Jared,
It was true that you could leave out optional parameters and they use their deafult. I couldn't understand how "" corrected it ??? Syntax was indeed wrong. From help file :

expression.Sort(Key1, Order1, Key2, Type, Order2, Key3, Order3, Header, OrderCustom, MatchCase, Orientation, SortMethod)

(All parameters optional)
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