LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 8
Default Format only part of a DataLabel in Excel 2007/PowerPoint 2007 char


I am trying to custom format datalabels in a chart, for example if a
DataLabel says 12%. I want to change it to say 12% A.

This is fine, I have code (I'm actually using C# to develop but I made it
into VBA code because I think it is clearer for this forum):
ActiveSheet.ChartObjects("Chart 1").Activate
Set point = ActiveChart.SeriesCollection(6).Points(1)
point.DataLabel.Text = point.DataLabel.Text & " A"

I saw similar code here too
(http://peltiertech.com/Excel/Charts/...Notation.html).

This setting of the size on a given range of text within the label is not
working for me, it is simply setting the formatting on the entire label.

I know that this is notionally possible, you can manually in
Excel/PowerPoint etc. select a range of text within a data label and change
the formatting okay. It is just that the API seems faulty, or I am
misunderstanding the API somehow?

This part works fine. However I want to set a different text format on the
A. So I try:
Dim chars As Characters
Set chars =
point.DataLabel.Characters(Len(point.DataLabel.Cha racters.Text), 1)
chars.Font.Size = 7



 
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
emailing part of spreadsheet using Excel 2007 and Outlook 2007 Brian Excel Discussion (Misc queries) 1 February 12th 09 10:26 PM
Excel & Powerpoint 2007 Paula Excel Discussion (Misc queries) 1 January 8th 09 08:21 PM
hyperlink in Excel 2007 spreadsheet cell, to a Powerpoint 2007 sli Bob W Excel Discussion (Misc queries) 7 December 9th 08 09:13 PM
Linking Excel 2007 to Powerpoint 2007 Russ Links and Linking in Excel 0 June 24th 08 02:14 PM
Chart Selection - Excel 2007 copy to Powerpoint 2007 GS80 Charts and Charting in Excel 1 February 7th 08 01:30 PM


All times are GMT +1. The time now is 04:07 PM.

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

About Us

"It's about Microsoft Excel"