How do I write text on a bar chart using VBA

B

Barney

I have a worksheet with various bar charts. I want to write text inside the
bar but cannot figure out the correct control name to modify the text. Any
help is appreciated
 
J

Jon Peltier

You can add a data label to the data point.

With ActiveChart.SeriesCollection(1).Points(1)
.HasDataLabel = True
With .Datalabel
.Caption = "Hello"
.Position = xlLabelPositionCenter
.Orientation = xlUpward
'' and more if desired
End With
End With

- Jon
 

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