Thank you Yuri, your help gave me a clue for doing something else. Thank you very much!
Luis
>One of the solutions could be to move chart from one sheet to another. Record a macro and translate it to foxpro.
>
>Another solution could be like this:
>
>
>oleapp.Worksheets(1).ChartObjects.Add(100, 100, 200, 200)
>
>Wait wind "Creating Graph from cells(1,1) to cells(40,2) ..." nowait
>
>oleapp.Worksheets(1).chartobjects(1).chart.;
> chartwizard(oleapp.Worksheets(2).;
> range(oleapp.Worksheets(2).cells(1,1),oleapp.Worksheets(2).cells(40,2)),;
> -4169,6,2,1,0,0,"Title","X-axis","Y-axis","")
>
>
>with oleapp.Worksheets(1).chartobjects(1).chart
>......
>
>
>
>
>>Hi friend!
>>
>>I'm using Excel OLE automation to create a chart whose data source is in a worksheet. I need to create a chart in the same sheet as the data is. How can I do it? I used the Add() method of the charts class but it creates a new chart as a new sheet, I don't want that. I want to have the chart incrusted in a sheet.
>>
>>Any hepl would be very appreciated.
>>
>>TIA
>>
>>Luis Guerra