>Hello,
>
>Is there someone who can help me out with a excel sorting problem?
>
>I have a excel sheet i acces from Fospro.
>The data is read from a fox table and put in a sheet.
>Now i want to sort a range in excel descending but i allways get an error.
>
>My code of line is:
>
> oWorkBook.ActiveSheet.Range("A17:C36").Sort Key1.Range("C18").Order1=xlDescending
>
>Can anybody please solve my problem?
>
>
>Thanks
>ad
You can't use directly macro code in VFP program. You must translate it:
#DEFINE xlDescending 2
oWorkBook.ActiveSheet.Range("A17:C36").Sort(oWorkBook.ActiveSheet.Range("C18"),2)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.