Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding a Chart Datalabel with a Webding
Neat idea. Thanks. - John
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DataLabel.Font.ColorIndex vs DataLabel.Text (Private Sub does not work in excel 2003) | Charts and Charting in Excel | |||
DataLabel Overlap | Charts and Charting in Excel | |||
datalabel box is too small | Charts and Charting in Excel | |||
I have a bar chart and i want to horizontaly align the datalabel | Charts and Charting in Excel | |||
Edit datalabel positions in a protected chart | Charts and Charting in Excel |