Kevin,
Try to declare the following variables in the program before executing the OLE codes.
* END-Arrow values
xlDown =-4121
xlToRight =-4161
xlToLeft =-4159
xlUp =-4162
HTH, Ramil
>I am having some trouble with some relatively easy commands when controlling excel via VFP.
>
>1.) First I am try to insert three rows at the top. If I record an excel macro I get:
>
> Rows("1:3").Select
> Selection.Insert Shift:=xlDown
>
>In vfp I am trying
>
> WITH .ActiveWorkbook.ActiveSheet
> .Rows("1:3").Select
> .select.Insert Shift = xlDown -- error here
> endwith
>
>Also tried a whole bunch of combinations and I couldn't get it to work. (xldown comes from the included excel.h file)
>Any suggestions or advice would be greatly appreciated.
>
>Thanks,
>
>Kevin
ramil
~~ learning to stand still