Excel 2007 problem modifying chart

oCoCarbon

New Member
Joined
Oct 11, 2010
Messages
29
I have a workbook that works fine in Excel 2010 but I'm trying to make it backwards-compatible for my other machine. The problem occurs when I try to work with a ChartObject which is one of two in a chart sheet called RadarChart. The two ChartObjects are named "Radar" and "Bar".

The code that produces the error is:

Code:
    RadarChart.Activate
    ActiveSheet.ChartObjects("Radar").Activate 'error is here
    ActiveChart.SetSourceData        Source:=Sheets("Calculator").Range("GraphData")

The error is "Run-time error '-2147417848 (80010108)': Method 'Activate' of object 'ChartObject' failed".

As I said this works fine in 2010. When the error came up I tried recording a macro to see how to select it and Excel told me I should use

Code:
    ActiveSheet.ChartObjects("Radar").Activate

but even when I just try to run the macro back it produces the same error. What is going on here?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try without activating

Code:
ActiveSheet.ChartObjects("Radar").Chart.SetSourceData Source:=Sheets("Calculator").Range("GraphData")
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top