Changing a Chart Title Using VBA in Excel 2007:-
The Layout ribbon’s built-in menus let you add a title above a chart, but they don’t offer you the ability to change the characters in a chart title or axis title In the user interface, you can simply double-click the chart title text and type a new title to change the title. Unfortunately, the macro recorder does not record this action.
To specify a chart title, you must type this code:
ActiveChart.ChartTitle.Caption = “My Chart”
Similarly, you can specify the axis titles by using the Caption property. The following code will change the axis title along the category axis:
ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Caption = “Months”


LinkBack URL
About LinkBacks
Reply With Quote

LinkBacks Enabled by vBSEO
Bookmarks