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'***
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.
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.
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.
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.
You should have double quotes around the font name instead of single quotes:
ActiveChart.ChartTitle.Font.Name = "Calibri"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With