Chart.SetDefaultChart method (Excel)
Specifies the name of the chart template that Microsoft Excel uses when creating new charts.
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 (XlChartGallery) 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"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.