Name

Application.SetDefaultChart([FormatName], [Gallery])

Synopsis

Sets the default chart type used by Excel.

Argument

Setting

FormatName

Can be one of the XlChartType constants, xlBuiltIn, or the name of a custom chart type

Gallery

Not used

For example, the following code sets the default chart type to a 3-D style:

Sub TestSetChartType(  )
    Application.SetDefaultChart XlChartType.xl3DArea
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.