Centered Overlay Title in VBA

  • Thread starter Thread starter Barb Reinhardt
  • Start date Start date
B

Barb Reinhardt

I'd like to ensure that the titles of my chart are all set to be "Centered
Overlay Title", but I can't figure out the code to do it. I've got the chart
object named myCht. What next?

Thanks,
Barb Reinhardt
 
Excel 2007
Sub TitleFormat()
With Sheets("Data").ChartObjects(1).Chart
.SetElement (msoElementChartTitleAboveChart)
.SetElement (msoElementChartTitleCenteredOverlay)
.ChartTitle.Text = "MyChart"
End With
End Sub
 
Back
Top