A macro to change font size

  • Thread starter Thread starter Mahadevan Swamy
  • Start date Start date
M

Mahadevan Swamy

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
 
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
 

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

Back
Top