S
Shilps
Hi,
I have this piece of code
ActiveSheet.ChartObjects("Chart 5").Activate
ab = ActiveChart.SeriesCollection(1).DataLabels.Count
Debug.Print "count", ab
lup = 10
With ActiveChart.SeriesCollection(1)
For a = 2 To ab
.DataLabels(a).Caption = Range("A" + CStr(lup)).Value
lup = lup + 1
Next
End With
It is giving RunTime error 1004 on line .DataLabels(a).Caption = Range("A"
+ CStr(lup)).Value
Whereas this code is running fine on all the other charts. Any clue why?
TIA
I have this piece of code
ActiveSheet.ChartObjects("Chart 5").Activate
ab = ActiveChart.SeriesCollection(1).DataLabels.Count
Debug.Print "count", ab
lup = 10
With ActiveChart.SeriesCollection(1)
For a = 2 To ab
.DataLabels(a).Caption = Range("A" + CStr(lup)).Value
lup = lup + 1
Next
End With
It is giving RunTime error 1004 on line .DataLabels(a).Caption = Range("A"
+ CStr(lup)).Value
Whereas this code is running fine on all the other charts. Any clue why?
TIA