Hi,
I've created an VB6 App with a OLE Excel Chart object embedded. I'm
trying to change the datarange of the chart. I need help!!!!
This is my code:
Dim wb As Excel.Workbook
set wb = Me.oleCVAverages.object 'This is the OLE Excel chart
With wb
.Sheets("Chart1").Activate
.Sheets("Chart1").Select
.ActiveChart.PlotArea.Select
.ActiveChart.SetSourceData
Source:=Sheets("Sheet1").Range("B2:B17"), PlotBy:=xlColumns
End With
I receive the following error: Select Method of Chart class failed.
This error is on the line: .Sheets("Chart1").Select
Another error I recieve regular is: Select Method of Walls class
failed
Please Help
Thanks
Colin
Archived from group: microsoft>public>vb>ole