Syntax

expression.SetDefaultChart(FormatName, Gallery)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
FormatName Optional Variant Specifies the name of a custom autoformat. This name can be a string naming a custom autoformat, or it can be the special constant xlBuiltIn to specify the built-in chart template.
Gallery Optional Variant The specific gallery (of custom charts) that stores the string for the custom format. It can be either xlBuiltIn or xlUserDefined.

Example

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

Visual Basic for Applications
Application.SetDefaultChart FormatName:="Monthly Sales", _ Gallery:=xlUserDefined 

See also: