• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Change all chart typefaces in all worksheets

mikelowski

New Member
Hi,

I'm trying to come up with the proper code but it's being a pain. The idea is to select all chart objects in the workbook and change the font family and size.

Thanks!
 
Hi Mike..

Themes and chart template are works great in this situation..

in case of vba.. please upload a sample file..
 
Well, no need to upload because I cannot make it to work... Here is the code and I'm not sure what I should modify:

Code:
Sub ChangeFonts()
Dim ws As Worksheet
Dim ch As ChartObjects
    For Each ws In ThisWorkbook.Worksheets
    For Each ch In ws.ChartObjects
        With ActiveSheet.Shapes(1).TextFrame2.TextRange.Font
        .NameComplexScript = "Arial"
        .NameFarEast = "Arial"
        .Name = "Arial"
        End With
        ActiveSheet.Shapes(1).TextFrame2.TextRange.Font.Size = 10
        Next ch
        Next ws
End Sub
 
Back
Top