gpt4 book ai didi

excel - : . Font.FontStyle = "Bold"与 .Font.Bold = msoTrue 之间的区别

转载 作者:行者123 更新时间:2023-12-04 21:35:45 27 4
gpt4 key购买 nike

我正在通过 excel-vba 构建图表。我正在使用以下行之一将我的 X 轴字体设置为粗体:

       Activechart.Axes(xlCategory).TickLabels.Font.FontStyle = "Bold"
Activechart.Axes(xlCategory).TickLabels.Font.Bold = msoTrue

这两种方法都有效,但我想知道有什么区别。

谢谢

最佳答案

您可以使用 FontStyle 一次设置多个字体属性
ActiveChart.Axes(xlCategory).TickLabels.Font.FontStyle = "Bold Italic"

With ActiveChart.Axes(xlCategory).TickLabels.Font

.Font.Bold = True
.Font.Italic = True

End With

关于excel - : . Font.FontStyle = "Bold"与 .Font.Bold = msoTrue 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38712821/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com