Insert text in Chart object

A

Andy Pope

Hi,

Manually: select chart ad simply type some text. When you it enter a
textbox will be added.

VBA:
Sub y()
Dim objX As Shape

Set objX = ActiveChart.Shapes. _
AddTextbox(msoTextOrientationHorizontal, 1, 1, 70, 15)
objX.TextFrame.Characters.Text = "Hello World"

End Sub

Cheers
 
J

Jon Peltier

Adrian -

You can associate labels with data points by double clicking on the points, and
choosing the Data Labels tab. If you are not offered enough options through the
dialog, you can use one of the following free utilities to use a range of cells as
labels:

Rob Bovey's Chart Labeler, http://appspro.com
John Walkenbach's Chart Tools, http://j-walk.com

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Top