Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Adding a Chart Datalabel with a Webding

I'm pulling my hair out trying to figure this out. I have some VBA
code that adds data labels to a chart. On some of the labels I want to
tack on a symbol of some sort to flag it. (Perhaps using a wingding or
webding font.) I know how to change the font for certain characters in
the data label but can't figure out how to determine how to determine
the proper character code.

For instance, the following will add the Info symbol (i with a circle)
and format it properly. But what if I want to use another symbol from
the character map? How do I determine which letter to use or code as
in Alt+0123? Thanks

- John

===========================================

For i = 1 To pts.Count
pts(i).ApplyDataLabels Type:=xlShowValue
With pts(i).DataLabel
.Text = rngLabels(i, 1) & " " & "i"
End With

With pts(i).DataLabel.Characters(Len(rngLabels(i, 1)) + 2, 10)
.Font.Name = "Webdings"
.Font.FontStyle = "Normal"
.Font.Size = 14
End With
Next i

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Adding a Chart Datalabel with a Webding

Hi John,

Why not build a conversion table for yourself like so?

Sub ShowFont()
Dim i As Integer
Dim rngStart As Range

Set rngStart = Range("A1")

With rngStart
For i = 1 To 255
.Offset(i - 1, 0) = i
.Offset(i - 1, 1) = Chr(i)
.Offset(i - 1, 2) = Chr(i)
.Offset(i - 1, 2).Font.Name = "Webdings"
Next
End With
End Sub

Ed Ferrero
Microsoft Excel MVP
http://www.edferrero.com

I'm pulling my hair out trying to figure this out. I have some VBA
code that adds data labels to a chart. On some of the labels I want to
tack on a symbol of some sort to flag it. (Perhaps using a wingding or
webding font.) I know how to change the font for certain characters in
the data label but can't figure out how to determine how to determine
the proper character code.

For instance, the following will add the Info symbol (i with a circle)
and format it properly. But what if I want to use another symbol from
the character map? How do I determine which letter to use or code as
in Alt+0123? Thanks

- John

===========================================

For i = 1 To pts.Count
pts(i).ApplyDataLabels Type:=xlShowValue
With pts(i).DataLabel
.Text = rngLabels(i, 1) & " " & "i"
End With

With pts(i).DataLabel.Characters(Len(rngLabels(i, 1)) + 2, 10)
.Font.Name = "Webdings"
.Font.FontStyle = "Normal"
.Font.Size = 14
End With
Next i



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Adding a Chart Datalabel with a Webding

Neat idea. Thanks. - John

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
DataLabel.Font.ColorIndex vs DataLabel.Text (Private Sub does not work in excel 2003) God Itself Charts and Charting in Excel 4 April 22nd 09 03:40 PM
DataLabel Overlap Stan Charts and Charting in Excel 0 April 30th 07 03:40 AM
datalabel box is too small BJ Charts and Charting in Excel 1 March 19th 07 12:06 PM
I have a bar chart and i want to horizontaly align the datalabel charles Charts and Charting in Excel 1 August 12th 06 01:26 AM
Edit datalabel positions in a protected chart Joy Charts and Charting in Excel 1 June 13th 05 08:18 PM


All times are GMT +1. The time now is 12:36 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"