Series.XValues property (Word)
Returns or sets an array of x values for a chart series. Read/write Variant.
Syntax
expression.XValues
expression A variable that represents a 'Series' object.
Remarks
You can set the XValues property to a range on a worksheet or to an array of values, but not to a combination of both.
For PivotChart reports, this property is read-only.
Example
The following example sets the values from a range address.
With ActiveDocument.InlineShapes(1)
If .HasChart Then
.Chart.SeriesCollection(1).XValues = "=Sheet1!B1:B5"
End If
End With
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).XValues = _
Array(5.0, 6.3, 12.6, 28, 50)
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for