Changing the font size in the charts

N

navin

Hi,

In a spreadsheet i have, some 20 charts along with the data. I have to
reduce the font size for the x and y axis and the title. For one chart
i can use the active chart method to achieve.

Please tell me, how i can loop through all the charts in the sheets
and reduce the fonts.

Please help.

Thanks,
Navin
 
G

Guest

Navin,

Maybe something like this. It sets the font size of tick labels and axis
titles to 8.

Sub Test()
Dim sht As Worksheet
Dim chtObject As ChartObject
Dim cht As Chart

For Each sht In Worksheets
For Each chtObject In sht.ChartObjects
Set cht = chtObject.Chart
With cht.Axes(xlCategory)
.TickLabels.Font.Size = 8
.AxisTitle.Font.Size = 8
End With
With cht.Axes(xlValue)
.TickLabels.Font.Size = 8
.AxisTitle.Font.Size = 8
End With
Next chtObject
Next sht
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top