DataLabel Property [Excel 2003 VBA Language Reference]

Returns a DataLabel object that represents the data label associated with the point or trendline. Read-only.

Remarks

To turn on data labels for a trendline you need to set the DisplayEquation property or the DisplayRSquared property to True.

Example

This example turns on the data label for point seven in series three in Chart1, and then it sets the data label color to blue.

With Charts("Chart1").SeriesCollection(3).Points(7)
    .HasDataLabel = True
    .ApplyDataLabels type:=xlValue
    .DataLabel.Font.ColorIndex = 5
End With

Applies to | Point Object | Trendline Object

See Also | ApplyDataLabels Method | HasDataLabel Property