>I'm trying to control Excel from VFP. I can make the change in Excel but I can't figure out how to get VFP to control Excel to do the same thing.
>
>I got this far:
>
> WITH loActiveSheet
> .Columns("P:P").Select
> With Selection && this line fails to compile
> END WITH && this line fails to compile
> ENDWITH && loActiveSheet
>
>I can figure out the Excel constants, but I can't figure out how to convert the "With Selection" line.
Excel is using a shortcut: use loActiveSheet.Application.Selection
You will want to change the END WITH to ENDWITH as well.