>Hello all,
>
>I try to translate excel macro to VFP code. Everythink work perfect for me except one command.
>Can somebody help me how to translate following VBA command to VVP?
>
>ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("B6:AC6") _
> , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
>
>I have no problem with passing parameters from FoxPro to Sort.SortFields.Ad method
>except one - Key:=Range("B6:AC6"). How can I create RANGE variable in FoxPro and
>how can I pass it to Excel?
>
>Thanks in advance
>Maroš Klempa
I haven't tested, but IMHO you can simply pass a variable here, e.g. RANGE(m.lcRange) where lcRange is "B6:AC6").
You can also check
http://berezniker.com/content/pages/visual-foxpro/excel-convert-column-number-column-reference
If it's not broken, fix it until it is.
My Blog