anne.gomes
06-12-2014, 05:17 PM
What is a better way of writing this?
Sub Macro1()
Dim chlabels As Integer
chlabels = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
For Each DataLabel In chlabels
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(chlabels).DataLabels.Select
Selection.Delete
Next DataLabel
End Sub
Sub Macro1()
Dim chlabels As Integer
chlabels = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
For Each DataLabel In chlabels
ActiveChart.ChartArea.Select
ActiveChart.SeriesCollection(chlabels).DataLabels.Select
Selection.Delete
Next DataLabel
End Sub