ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A macro to change font size (https://www.excelbanter.com/excel-programming/393511-macro-change-font-size.html)

Mahadevan Swamy

A macro to change font size
 
Hi,

I have four graphs in one worksheet and I have about 15 worksheets. It
is a tiresome process to go to each and every graph to change the font
size of x-axes, y-axes, bar values, x and y labels etc.... I tried
using a macro to do this but it is sticking to one worksheet which i
recorded the macro and doesn't change the others. Is there a way to
avoid this tiresome process? Thanks

Swamy


Peter T

A macro to change font size
 
Sub Test()
Dim ws As Worksheet
Dim chtObj As ChartObject

For Each ws In ActiveWorkbook.Worksheets
For Each chtObj In ws.ChartObjects
chtObj.Chart.ChartArea.Font.Size = 10
Next
Next

End Sub

Regards,
Peter T
"Mahadevan Swamy" wrote in message
oups.com...
Hi,

I have four graphs in one worksheet and I have about 15 worksheets. It
is a tiresome process to go to each and every graph to change the font
size of x-axes, y-axes, bar values, x and y labels etc.... I tried
using a macro to do this but it is sticking to one worksheet which i
recorded the macro and doesn't change the others. Is there a way to
avoid this tiresome process? Thanks

Swamy





All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com