Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 147
Default XY scatter, select item in list to flag point

I have created an XY scatter graph and included code to show a data label for
each point in a text box. I have included a drop down box to list all
possible data labels. I want to be able to select one item from the list,
and for the relevant point to then change colour.
I know I could do this using multiple series and using the drop down to
specify the second series, but this interferes with the first macro.
Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 126
Default XY scatter, select item in list to flag point

Two questions.

First, why do you use textboxes to add data labels? It can, and
should, be done with Excel data labels.

Second, even if you must stay with code to add data labels, there's no
reason it should not play nice with a 2nd series. Just write the code
so that it works with the first, i.e., main, series.

On Wed, 6 Aug 2008 02:20:00 -0700, Christine
wrote:

I have created an XY scatter graph and included code to show a data
label for
each point in a text box. I have included a drop down box to list all
possible data labels. I want to be able to select one item from the
list,
and for the relevant point to then change colour.
I know I could do this using multiple series and using the drop down
to
specify the second series, but this interferes with the first macro.
Any ideas?

Regards,

Tushar Mehta
Microsoft MVP Excel 2000-2008
www.tushar-mehta.com
Tutorials and add-ins for Excel, PowerPoint, and other products
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 147
Default XY scatter, select item in list to flag point

Textbox: there are over a hundred points, it's easier to see the label if
it's placed in a text box in one place out of the graph, and includes the
coordinates.
Code: it shows false readings for the second series which is unsatisfactory
for sharing with others so either need to start again or find a more
interesting solution.
Christine

"Tushar Mehta" wrote:

Two questions.

First, why do you use textboxes to add data labels? It can, and
should, be done with Excel data labels.

Second, even if you must stay with code to add data labels, there's no
reason it should not play nice with a 2nd series. Just write the code
so that it works with the first, i.e., main, series.

On Wed, 6 Aug 2008 02:20:00 -0700, Christine
wrote:

I have created an XY scatter graph and included code to show a data
label for
each point in a text box. I have included a drop down box to list all
possible data labels. I want to be able to select one item from the
list,
and for the relevant point to then change colour.
I know I could do this using multiple series and using the drop down
to
specify the second series, but this interferes with the first macro.
Any ideas?

Regards,

Tushar Mehta
Microsoft MVP Excel 2000-2008
www.tushar-mehta.com
Tutorials and add-ins for Excel, PowerPoint, and other products

  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 120
Default XY scatter, select item in list to flag point

Christine,
Consider once more your idea with textboxes and list dropdowns. After all,
if you list texts to the labels in the original sheet, you would be able to
control easily not only their contents but even the color, font etc. If you
have already worked hard to create a macro, you can also make another one,
which links the texts and properties (including color) of the items of the
€ślabels€ť range to those of the labels themselves, especially if they count to
hundred. The overall subroutine, you can certainly put together, that creates
regular labels can then include following snip

..... Ser was defined as arbitrary of your series
..... RngLabels is the (adjacent) range of the label texts

Ser.HasDataLabels = True
For I = 1 To Ser.Points.Count
If Not IsEmpty(RngLabels(I)) Then
Ser.Points(I).DataLabel.Text = RngLabels(I).Text
Ser.Points(I).DataLabel.Characters.Font.ColorIndex = _
RngLabels(I).Characters.Font.ColorIndex
Else
Ser.Points(I).DataLabel.Text = ""
End If
Next I

The subroutine may be promptly repeated at every change you made in a labels
range item.
Each label is movable just like a textbox, so you could and must solve the
throng. This is really difficult to automatize.
Regards

--
Petr Bezucha


"Christine" wrote:

Textbox: there are over a hundred points, it's easier to see the label if
it's placed in a text box in one place out of the graph, and includes the
coordinates.
Code: it shows false readings for the second series which is unsatisfactory
for sharing with others so either need to start again or find a more
interesting solution.
Christine

"Tushar Mehta" wrote:

Two questions.

First, why do you use textboxes to add data labels? It can, and
should, be done with Excel data labels.

Second, even if you must stay with code to add data labels, there's no
reason it should not play nice with a 2nd series. Just write the code
so that it works with the first, i.e., main, series.

On Wed, 6 Aug 2008 02:20:00 -0700, Christine
wrote:

I have created an XY scatter graph and included code to show a data
label for
each point in a text box. I have included a drop down box to list all
possible data labels. I want to be able to select one item from the
list,
and for the relevant point to then change colour.
I know I could do this using multiple series and using the drop down
to
specify the second series, but this interferes with the first macro.
Any ideas?

Regards,

Tushar Mehta
Microsoft MVP Excel 2000-2008
www.tushar-mehta.com
Tutorials and add-ins for Excel, PowerPoint, and other products

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
How do I select more than one item from a drop down pick list? Greg Excel Discussion (Misc queries) 2 January 16th 08 10:43 PM
How do I select more than one item from a drop down pick list? Greg Excel Worksheet Functions 1 January 16th 08 03:08 PM
select more than one item in list jen_writer Excel Discussion (Misc queries) 2 January 24th 07 09:12 PM
Point, Click and select from a menu/list... JemyM New Users to Excel 3 September 12th 05 11:41 PM
How select an item in a list box jamie81 Excel Worksheet Functions 1 May 31st 05 09:53 AM


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