SetDefaultChart method (Excel Graph)
Specifies the name of the chart template that Graph will use when creating new charts.
Syntax
expression.SetDefaultChart (FormatName, Gallery)
expression Required. An expression that returns one of the objects in the Applies To list.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
FormatName | Optional | Variant | The name of the specified custom autoformat. This name can be a string that denotes the custom autoformat, or it can be the special constant xlBuiltIn to specify the built-in chart template. |
Gallery | Optional | Variant |
Example
This example sets the default chart template to the custom autoformat named Monthly Sales.
myChart.Application.SetDefaultChart FormatName:="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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for