P
patrick molloy
Yes-----Original Message-----
The following code was suggested to place text on a chart
data series line, in addition to the normal data labels:
Set seSales = ActiveSheet.ChartObjects
(1).Chart.SeriesCollection(1)
seSales.HasDataLabels = True
seSales.Points(2).DataLabel.Text = "Oranges"
This is all the code I have. Some questions:
1. Should there be "Sub." and "End Sub" lines?
SUB MySubName()
'''code
End Sub
in a standard code module. Press Alt+F11 then from the2. Where should I place the code?
menu Insert and Module
what error?3. How do I correct compile error on line two?
this code:
Set seSales = ActiveSheet.ChartObjects
(1).Chart.SeriesCollection(1)
should all be on one line, but you can add a space then
the underline character....
Set seSales = _
ActiveSheet.ChartObjects1).Chart.SeriesCollection(1)
1 points to the series,2 sets th eboolean that the series4. What does each line do?
has a label and 3 adds the text for the label
seSales is a variable that should be DIM'd as a Series5. What does the code "seSales" mean?
eg
DIM seSates As series
you need to change the series number to that which you6. I have three different lines on a chart on which to
place text. How would I do this?
want
ie
SeriesCollection(1)
to
SeriesCollection(3)
chage the chart series number to that which you want to7. Will this code work with multiple charts in one
worksheet?
use