Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.32 KB

Project.chart.applycustomtype.md

File metadata and controls

61 lines (37 loc) · 1.32 KB
title ms.service ms.assetid ms.date ms.localizationpriority
Chart.ApplyCustomType method (Project)
project-server
2bfe88c2-198e-a039-ace6-4ba362ce09d6
06/08/2017
medium

Chart.ApplyCustomType method (Project)

Applies a custom chart type to a chart.

Syntax

expression. ApplyCustomType (ChartType, TypeName)

expression A variable that represents a Chart object.

Parameters

Name Required/Optional Data type Description
ChartType Required Office.XlChartType The type of chart.
TypeName Optional Variant The name of the chart type.
ChartType Required XLCHARTTYPE
TypeName Optional Variant

Return value

Nothing

Example

The following example changes the chart type to a clustered 3D bar chart.

Sub SetChartType()
    Dim chartShape As Shape
    Dim reportName As String
    
    reportName = "Simple scalar chart"
    Set chartShape = ActiveProject.Reports(reportName).Shapes(1)
    
    Debug.Print "Chart type before: " & chartShape.Chart.ChartType
    chartShape.Chart.ApplyCustomType (xl3DBarClustered)
    Debug.Print "Chart type after: " & chartShape.Chart.ChartType
End Sub

See also

Chart Object

[!includeSupport and feedback]