How to change font properties of chart axes

How to change font properties of chart axes in Excel 2007 and 2010?

NOT the name of the axis; This one is simple. I ask about axis font.

It writes the equivalent in Excel 2010:

shEditSizeScales.ChartObjects("MyChart").Chart.Axes(xlCategory).Format.TextFrame2.TextRange.Font.Size=12

But I get an error and I don’t see anything in TextFrame2 in the "Observation" panel.

Even if I go through the recorded code, it will give me the same error.

I looked at the object model and I do not see it.

How to do it?

+4
source share
1 answer

Use this:

With ActiveChart.Axes(xlCategory).TickLabels.Font
        '.Bold = msoTrue
        .Size = 18
End With

Source: MS Ref Link

+2
source

All Articles