I'm trying to make sure all of the fonts in charts on a worksheet the same and that all title fonts are the same. I have different types of charts so I have the charts in chart groups.
I read that you have to active each chart in order to format it. I think I have to use ChartObject.
Sub Macro2()
Dim cover As Worksheet
Dim groupIndex As Long
Dim seriesIndex As Long
Dim cht As ChartObject
Set cover = Sheets("Sheet1")
cover.Activate
For Each cht In cover.Shapes.Range(Array("Group1")).GroupItems
cht.Activate
ChartArea.ChartTitle.Font.Size = 12
With ActiveChart.ChartArea.Font
BaselineOffset = 0
Bold = msoFalse
FontColor = vbRed
FontSize = 10
End With
Next
End Sub
I'm getting a type mismatch for the For statement.
With
statement you forgot to put a.
in front of the font properties. – JvdV