DataLabels Collection Object
Description
A collection of all the DataLabel objects for the specified series. Each DataLabel object represents a data label for a point or trendline. For a series without definable points (such as an area series), the DataLabels collection contains a single data label.
Using the DataLabels Collection
Use the DataLabels method to return the DataLabels collection. The following example sets the number format for data labels on series one on chart sheet one.
With Charts(1).SeriesCollection(1)
.HasDataLabels = True
.DataLabels.NumberFormat = "##.##"
End With
Use DataLabels(index), where index is the data-label index number, to return a single DataLabel object. The following example sets the number format for the fifth data label in series one in embedded chart one on worksheet one.
Worksheets(1).ChartObjects(1).Chart _
.SeriesCollection(1).DataLabels(5).NumberFormat = "0.000"
Properties
Application property, AutoScaleFont property, AutoText property, Border property, Count property, Creator property, Fill property, Font property, HorizontalAlignment property, Interior property, Name property, NumberFormat property, NumberFormatLinked property, Orientation property, Parent property, Position property, ReadingOrder property, Shadow property, ShowLegendKey property, Type property, VerticalAlignment property.
Methods
Delete method, Item method (DataLabels collection), Select method.