In any version of Excel, if a chart is on its own chart sheet, you don’t have to specify the
container; you can simply refer to the
Chart object:
Sheets(“Chart1”).ChartArea.Interior.ColorIndex = 4
Creating a Chart
In previous versions of Excel, you used the Charts.Add command to add a new chart. You
then specified the source data, the type of chart, and whether the chart should be on a new
sheet or embedded on an existing worksheet. The first three lines of the following code
create a clustered column chart on a new chart sheet. The fourth line moves the chart back
to be an embedded object in
Sheet1:
Charts.Add
ActiveChart.SetSourceData Source:=Worksheets(“Sheet1”).Range(“A1:E4”) ...