>Not quite working Bruce.
>From the macro I receive this code:
>
> Range("A1:AG3453").Select
> Selection.Copy
> Windows("test.xls").Activate
> Sheets("FILE2").Select
> Range("C1").Select
> ActiveSheet.Paste
>
>How does this translate to VFP? I have tried to add "oexcel." to each command here but I still get the invalid index error
That looks like the right method, using Copy/Paste. I added a line of VBA at a time, and got this to work on two small test files:
oexcel = CREATEOBJECT("Excel.Application")
oexcel.visible = .t.
file1 = FULLPATH('file1.xls')
oexcel.workbooks.OPEN(file1)
oexcel.Range("A1:AG3453").Select
oexcel.Selection.Copy
file2 = FULLPATH('file2.xls')
oexcel.workbooks.OPEN(file2)
oexcel.Activesheet.Paste
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.