anne.gomes
06-18-2014, 06:31 PM
Hi,
I am trying to delete all datalabels in a chart except for the current dates'.
This is my code - which isnt working...
Sub Auto_Open()
Dim sery As Series
Dim Today As Date
Today = Date
Sheets("BU Aged Analysis WIP").Select
For Each sery In ActiveChart.SeriesCollection
If sery.HasDataLabels = True Then
If sery.DataLabels <> Today Then
sery.DataLabels.Select
Selection.Delete
End If
End If
Next sery
End Sub
Any help?
I am trying to delete all datalabels in a chart except for the current dates'.
This is my code - which isnt working...
Sub Auto_Open()
Dim sery As Series
Dim Today As Date
Today = Date
Sheets("BU Aged Analysis WIP").Select
For Each sery In ActiveChart.SeriesCollection
If sery.HasDataLabels = True Then
If sery.DataLabels <> Today Then
sery.DataLabels.Select
Selection.Delete
End If
End If
Next sery
End Sub
Any help?