vba 声明图表标题字体名称
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8499872/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 14:42:08 来源:igfitidea点击:
Declare Chart title font name
提问by user1097112
I'm formatting a chart and these statements all work fine, except for the last one. What is the correct form?
我正在格式化图表,这些语句都可以正常工作,除了最后一个。什么是正确的形式?
ActiveChart.ChartTitle.Select
ActiveChart.ChartTitle.Text = "History of IMS Transaction 'SPTVMS02'"
ActiveChart.ChartTitle.Font.Size = 20
ActiveChart.ChartTitle.Font.Bold = False
ActiveChart.ChartTitle.Font.Color = RGB(110, 10, 155)
***ActiveChart.ChartTitle.Font.Name = 'Calibri'***
回答by joeschwa
You should have double quotes around the font name instead of single quotes:
您应该在字体名称周围使用双引号而不是单引号:
ActiveChart.ChartTitle.Font.Name = "Calibri"