Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
emailing part of spreadsheet using Excel 2007 and Outlook 2007 | Excel Discussion (Misc queries) | |||
Excel & Powerpoint 2007 | Excel Discussion (Misc queries) | |||
hyperlink in Excel 2007 spreadsheet cell, to a Powerpoint 2007 sli | Excel Discussion (Misc queries) | |||
Linking Excel 2007 to Powerpoint 2007 | Links and Linking in Excel | |||
Chart Selection - Excel 2007 copy to Powerpoint 2007 | Charts and Charting in Excel |