This documentation is archived and is not being maintained.

Chart.SetDefaultChart Method

Office 2007
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

NameRequired/OptionalData TypeDescription
NameRequiredVariantSpecifies 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."

Visual Basic for Applications
ActiveChart.SetDefaultChart Name:="Monthly Sales"



Show: