Hello,
I'd appreciate some advice on my attempt to format data labels the same way each time my VBA sub changes a charts data range (using VBA because the # of series changes). Conceptually I put the code together below but I can't figure out the correct structure for access the datalabel formats.
[pre]
[/pre]
Any suggestions? Thanks. (I'm getting type mismatch on the For Each line)
I'd appreciate some advice on my attempt to format data labels the same way each time my VBA sub changes a charts data range (using VBA because the # of series changes). Conceptually I put the code together below but I can't figure out the correct structure for access the datalabel formats.
[pre]
Code:
Sub ChartTest()
With Worksheets("Regional Detail").ChartObjects("Chart 13").Chart
For Each SeriesCollection In Chart
DataLabels.NumberFormat = "#,##0.0"
DataLabels.Format.TextFrame2.TextRange.Font.Size = 12
Next SeriesCollection
End With
End Sub
Any suggestions? Thanks. (I'm getting type mismatch on the For Each line)