Chart.ChartGroups property (Project)
Gets an object that represents either a single chart group or a collection of chart groups, where a chart group represents one or more series of data points that are plotted with the same format. Read-only Object.
expression A variable that represents a Chart object.
A chart contains one or more chart groups, and each chart group contains one or more series of data points. For example, a single chart might contain both a line chart group, containing all the series plotted with the line chart format, and a bar chart group, containing all the series plotted with the bar chart format.
The following example should be run on a simple line chart. The example toggles drop lines on and off for the chart.
Sub ToggleDropLines() Dim chartShape As Shape Dim chartGroup As Office.IMsoChartGroup Dim dropLines As Boolean Dim reportName As String reportName = "Simple line chart" Set chartShape = ActiveProject.Reports(reportName).Shapes(1) Set chartGroup = chartShape.Chart.ChartGroups(1) dropLines = chartGroup.HasDropLines MsgBox "Chart group in " & reportName & ": " _ & vbCrLf & "Drop lines: " & dropLines chartGroup.HasDropLines = Not dropLines End Sub
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.