Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorting in Excel
Message
From
29/01/2004 14:00:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/01/2004 12:37:30
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00871887
Message ID:
00871943
Views:
18
>Can anyone tell me how to automate a sort in excel? I've tried several varieations on the macro code but can't quite seem to get it right.
>
>Here's my latest try which doesn't work.
>
>oSheet.Range("A6:W155").Sort(_Key1:=oSheet.Range("D6"))
>
>Thanks in advance for any help.

I think VFP will have trouble with the named parameters; try to use parameters by position. In case of doubt, click on "Sort" in the macro editor (in Excel), and press F1, to get alternative syntaxes.

If the macro editor gives you named parameters, AFAIK, these are usually in the correct order for the un-named version; that is, you can probably just omit "_Key1:=".
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform