We have seen that a PivotTable is created and added to the PivotTables collection by invoking the PivotTableWizard method. On the other hand, creating a new chart requires a different approach, since it depends upon whether the chart is standalone (a chart sheet) or embedded in a worksheet (and thus contained in a ChartObject object).
Also, unlike the PivotTableWizard method, the ChartWizard method does not create a chart; it merely formats an existing chart. Accordingly, there are three steps required to create a meaningful chart:
• Decide whether to create a standalone chart (a chart sheet) or an embedded chart.
• Create the standalone chart or embedded chart as described in the following section.
• Format the chart using either the ChartWizard method or using individual properties and methods of the chart object.
Was this article helpful?