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:
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
but even when I just try to run the macro back it produces the same error. What is going on here?
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?