April 2006
Beginner
1114 pages
98h 16m
English
series.XValues [= setting]
For xy scatter charts, sets or returns the x values of the series as an array. This property also accepts a Range object when being set. The following code changes the type of a series to xlXYScatter, then sets the x values for the series:
Sub SetXYValues( )
Dim chrt As Chart, sr As Series
' Get a chart.
Set chrt = ActiveChart
' Get first series
Set sr = chrt.SeriesCollection(1)
' Set the chart type to xy scatter.
sr.ChartType = xlXYScatter
' Set x values
sr.XValues = Array(1, 5, 3, 2)
End SubRead now
Unlock full access