Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Labels and chart sheets

Hello

Is it possible to put a label (from the developer tools) on a chart sheet
and edit the caption VBA? I'd like to be able to display information on those
labels when I click on a data point on a chart.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Labels and chart sheets

Here's how to add a label with VBA:

Sub AddLabel()
' remove old label with same name
On Error Resume Next
ActiveChart.Shapes("MyLabel").Delete
On Error GoTo 0

ActiveChart.Shapes.AddShape(msoShapeRectangle, 75, 50, 125, 25).Name =
"MyLabel"
End Sub


And here's how to change what appears in the label:

Sub JustPopulateLabel()
With ActiveChart.Shapes("MyLabel").TextFrame
.Characters.Text = "Here's what I want to say."
End With
End Sub


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


"Revolveri" wrote in message
...
Hello

Is it possible to put a label (from the developer tools) on a chart sheet
and edit the caption VBA? I'd like to be able to display information on
those
labels when I click on a data point on a chart.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
XY Chart Labels AK Charts and Charting in Excel 2 December 13th 07 07:27 AM
Chart labels disappear - How do I refresh the chart? jcloydjcloyd Charts and Charting in Excel 0 March 30th 06 07:49 PM
XY chart with labels DSK_7 Charts and Charting in Excel 1 June 24th 05 08:50 PM
chart labels? X Charter Charts and Charting in Excel 1 May 4th 05 05:57 AM
Chart sheets cause data sheets to be blank Jacinthe Charts and Charting in Excel 2 April 29th 05 02:18 PM


All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"