Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Declare Chart title font name

Tags:

excel

vba

charts

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'***
like image 431
user1097112 Avatar asked Dec 14 '11 05:12

user1097112


People also ask

How do I change the font of a chart title?

To change the text font for any chart element, such as a title or axis, right–click the element, and then click Font. When the Font box appears make the changes you want. Here's an example—suppose you want to change the font size of the chart title. Right click the chart title and click Font.

How do you make a title bold on a chart?

Chart Title Font Styles – Change the font to Bold You can change the font to bold by clicking the Bold command (B) in the font group from the Home Tab in the Ribbon menu.

How do I change the chart title size in Excel?

But if you want to resize the title of the chart, you cannot drag it to the size you want, and you need to select the tile text and change the font of the tile to meet the size you want.

How do I change the chart title color?

Right click on the chart title, now you can see the quick format bar and chart title properties menu. Select the 'Format Chart Title' option from the chart title properties menu. Now you can see the 'Format Chart Title' tool. We can use the this tool to format and change the fill or background color of the chart.


1 Answers

You should have double quotes around the font name instead of single quotes:

 ActiveChart.ChartTitle.Font.Name = "Calibri"
like image 136
joeschwa Avatar answered Sep 25 '22 15:09

joeschwa