General information
Category:
COM/DCOM and OLE Automation
>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"))
>
Without testing, I think the only problem is the way you're passing the parameter. VFP doesn't support named parameters the way VBA does. You have to pass just the parameter value in the right position:
oSheet.Range("A6:W155").Sort(oSheet.Range("D6"))
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only