Index Property

Microsoft Office Web Components Visual Basic

Index Property

Returns the index number of the specified object within the collection of similar objects. Read/write Long for the ChSeries object; read-only Long for all other objects in the Applies To list.

expression .Index

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

You can set the index number of a ChSeries object. The specified series is moved to the specified position, and other series are reordered as necessary.

The index value of a ListRow object corresponds to its current position in the XML list. Following a sort, or after adding or deleting a row, a given row may have a new index value based on its new position.

Example

This example moves series 1 to the fourth index position of an XY chart containing 6 series. During the move, series 2 through 4 are reordered to series 1 through 3. Series 0 and series 5 stay in the same position.

ChartSpace1.Charts(0).SeriesCollection(1).Index = 4