Series.XValues Property (Word)

Returns or sets an array of x values for a chart series. Read/write Variant.

Version Information

Version Added: Word 2007

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

Concepts

Series Object Members

Series Object