问题
How do I change the font properties of chart axes in Excel 2007 & 2010?
NOT the axis title; that one's easy. I'm asking about the font of the axis itelf.
It records equivalent to this in Excel 2010:
shEditSizeScales.ChartObjects("MyChart").Chart.Axes(xlCategory).Format.TextFrame2.TextRange.Font.Size=12
But I get an error on that, and I don't see anything past TextFrame2 in the Watch pane.
Even if I step through the recorded code, it gives me the same error.
I've looked through the object model and I don't see it.
How is it done?
回答1:
Use this:
With ActiveChart.Axes(xlCategory).TickLabels.Font
'.Bold = msoTrue
.Size = 18
End With
Source: MS Ref link
来源:https://stackoverflow.com/questions/27028681/how-to-change-font-properties-of-chart-axes