23.1. Working with Charts
This section shows you how to use VBA to create and format charts, either as entire chart sheets in a Workbook or as objects on an existing worksheet.
23.1.1. Creating a Chart
VBA uses the Chart object to represent a chart on a chart sheet and a ChartObject object to represent an embedded chart on a worksheet. The ChartObject object contains a Chart object, which you can manipulate by accessing it through the ChartObject.
Whichever method you use, when writing a procedure you create the chart or chart object in a different order than when working manually:
You add the chart or chart object.
You specify the source range for its data.
You specify the chart type.
You specify any other items you want to add.