Changing the font size in the charts
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 |
Changing the font size in the charts
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 -- Hope that helps. Vergel Adriano "navin" wrote: 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 |
All times are GMT +1. The time now is 10:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com