Centered Overlay Title in VBA

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
 
H

Herbert Seidenberg

Excel 2007
Sub TitleFormat()
With Sheets("Data").ChartObjects(1).Chart
.SetElement (msoElementChartTitleAboveChart)
.SetElement (msoElementChartTitleCenteredOverlay)
.ChartTitle.Text = "MyChart"
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top