A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How do I write text on a bar chart using VBA



 
 
Thread Tools Display Modes
  #1  
Old November 11th, 2009, 04:59 PM posted to microsoft.public.excel.charting
Barney
external usenet poster
 
Posts: 9
Default How do I write text on a bar chart using VBA

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
  #2  
Old November 11th, 2009, 05:27 PM posted to microsoft.public.excel.charting
Jon Peltier[_2_]
external usenet poster
 
Posts: 386
Default How do I write text on a bar chart using VBA

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
-------
Jon Peltier
Peltier Technical Services, Inc.
http://peltiertech.com/



Barney wrote:
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:34 PM.


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