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: 18
Default Data Label for XY Scatter Plot

I tried using code that John Mansfield had posted a while back with a
modification and its not working right. I get the following error:
"run-time error '91'" My data is on a worksheet and the chart is on a
chartsheet and I have set the code to run when this chartsheet is
activated. To give you a little more background series 1 & 2 of this
chart are line graphs and series 3 is the xy scatter graph. I was
hoping someone could help me figure out what I'm doing wrong and why
I'm getting the error above. Below is the modified code:

Sub AttachLabelsToPoints()

Dim RngLabels As range
Dim Ser As Series
Dim i As Long

Ser = ActiveChart.SeriesCollection(3) <==== This is where the
debugger stops to highlight my code
Set RngLabels = ActiveWorkbook.Worksheets(1).range("e10:e17")

Ser.HasDataLabels = True

For i = 1 To Ser.Points.Count
Ser.Points(i).DataLabel.Text = RngLabels(i)
Next i

End Sub

Thanks in advance....AJ
 
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
hyperlinking xy scatter plot data label to a cell Laoballer Excel Discussion (Misc queries) 0 September 19th 08 10:42 PM
How do I label data points in a scatter graph Justin[_3_] Charts and Charting in Excel 1 October 26th 07 10:32 PM
Label XY scatter plot points by frequency of occurence (no pivot t Chris Gregory Charts and Charting in Excel 3 September 21st 05 01:05 AM
Can I copy x-y scatter plot data direct from one plot to another? Chris Charts and Charting in Excel 2 June 3rd 05 01:20 PM
scatter plot & label for a data point shabnam Charts and Charting in Excel 3 April 11th 05 06:37 PM


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