Series.Values property (PowerPoint)
Returns or sets a collection of all the values in the series. Read/write Variant.
Syntax
expression.Values
expression A variable that represents a 'Series' object.
Remarks
The value of this property can be either the address of a range on the chart's worksheet or an array of constant values, but not a combination of both. See the examples for details.
Example
Note
Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.
The following example sets the series values from a range address.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SeriesCollection(1).Values = "=Sheet1!B2:B5"
End If
End With
Note
Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.
To assign a constant value to each individual data point, you must use an array, as shown in the following example.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SeriesCollection(1).Values = _
Array(1, 3, 5, 7, 11, 13, 17, 19)
End If
End With
See also
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.