>>>oExcel.sheets(oVar.nSheetNumber).Move After:=Sheets(oVar.nSheetNumber-1)
>>
>>I don't know if this was a typo, but shouldn't it be
>>
>>>oExcel.sheets(oVar.nSheetNumber).Move After:=oExcel.Sheets(oVar.nSheetNumber-1)
>
>Thanks for writing!
>
>Well, the trouble that VFP is having is with the "After:" clause. Its syntax is foreign to VFP. So my question is about how to substitute this command line with something that VFP is more agreeable to.
>
>Michael Reynolds
The MoveAfter seems to be a method, though it seems to be assigned as a property (wrll, that's VB), so I guess this may do (unless a simple = instead := may do the trick)
oExcel.sheets(oVar.nSheetNumber).Move After(oExcel.Sheets(oVar.nSheetNumber-1))