如何更改图表轴的字体属性 [英] How to change font properties of chart axes

查看:144
本文介绍了如何更改图表轴的字体属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改Excel 2007中的图表轴的字体属性? 2010?

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.

它在Excel 2010中记录相当于此:

It records equivalent to this in Excel 2010:

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

但是我收到一个错误,我在Watch窗格中没有看到任何TextFrame2。

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.

如何做?

推荐答案

p>

Use this:

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

资料来源: MS Ref link

这篇关于如何更改图表轴的字体属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆