Chart.SetDefaultChart Method (Excel)

Specifies the name of the chart template that Microsoft Excel uses when creating new charts.

Version Information

Version Added: Excel 2007

Syntax

expression .SetDefaultChart(Name)

expression A variable that represents a Chart object.

Parameters

Name

Required/Optional

Data Type

Description

Name

Required

Variant

Specifies the name of the default chart template that will be used when creating new charts. This name can be a string naming a chart in the gallery for a user-defined template or it can be a special constant xlBuiltIn to specify a built-in chart template.

Example

This example sets the default chart template to the custom chart named "Monthly Sales."

ActiveChart.SetDefaultChart Name:="Monthly Sales"

See Also

Concepts

Chart Object Members

Chart Object