O'Reilly logo

Programming Excel with VBA and .NET by Steve Saunders, Jeff Webb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

chart.ChartWizard([Source], [Gallery], [Format], [PlotBy], [CategoryLabels], [SeriesLabels], [HasLegend], [Title], [CategoryTitle], [ValueTitle], [ExtraTitle])

Synopsis

Quickly creates and formats a chart by setting the most commonly used properties and applying a best guess for omitted settings.

Argument

Settings

Source

The Range object containing the data to chart.

Gallery

A constant indicating the type of chart to create. Can be one of these settings: xl3DArea, xl3DBar, xl3DColumn, xl3DLine, xl3DPie, xl3DSurface, xlArea, xlBar, xlColumn, xlCombination, xlDefaultAutoFormat, xlDoughnut, xlLine, xlPie, xlPie, xlRadar, or xlXYScatter.

Format

A number from 1 to 10 indicating the index of the chart subtype to create from the Chart Type dialog box.

PlotBy

xlRows plots each row as a series; xlColumns plots each column as a series.

CategoryLabels

The number of rows or columns in the source range that contain category labels.

SeriesLabels

The number of rows or columns in the source range that contain series labels.

HasLegend

True creates a legend on the chart; False omits the legend.

Title

The caption to include as the title on the chart. Omitting this argument when creating a chart omits the chart title.

CategoryTitle

The caption to include for the category axis (x-axis) on the chart. Omitting this argument when creating a chart omits the axis title.

ValueTitle

The caption to include for the value axis (y-axis) on the chart. Omitting this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required