LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Need Code Enhancements


-----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?

Yes
SUB MySubName()
'''code
End Sub
2. Where should I place the code?

in a standard code module. Press Alt+F11 then from the
menu Insert and Module
3. How do I correct compile error on line two?

what error?
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)


4. What does each line do?

1 points to the series,2 sets th eboolean that the series
has a label and 3 adds the text for the label

5. What does the code "seSales" mean?

seSales is a variable that should be DIM'd as a Series
eg
DIM seSates As series

6. I have three different lines on a chart on which to
place text. How would I do this?

you need to change the series number to that which you
want
ie
SeriesCollection(1)
to
SeriesCollection(3)



7. Will this code work with multiple charts in one
worksheet?

chage the chart series number to that which you want to
use


The problem: I use text boxes and callouts for

notations;

however, when the series lines change the boxes/callouts
must be manually moved on the charts. With 30+ charts,
this situation is out of control. I would like to 1.)

add
text to a line, and 2.) have the text move with the line
when the line (data values) change.

Thanks, Phil

.

 
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Excel In-cell Enhancements silverliningboy Excel Worksheet Functions 4 May 15th 06 08:58 PM
combining multiple columns into one column - enhancements markx Excel Worksheet Functions 0 February 16th 06 03:12 PM
Pivot Table Enhancements/Fixes in Excel 2003 aanyc Excel Discussion (Misc queries) 1 June 20th 05 09:23 PM
Need Code Enhancements Debra Dalgleish[_2_] Excel Programming 1 July 17th 03 03:39 PM


All times are GMT +1. The time now is 08:04 AM.

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"