>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