Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Need event for selecting a series on a chart

I have an embedded chart in sheet 1 of my workbook. I am looking to
put together an event driven macro depending on which line from the
graph is clicked on.

I have read Chris Pearsons page on event procedures and ChartObject
objects (http://www.cpearson.com/excel/Events.aspx), however this does
not allow me to work from the SeriesCollection object.

I usually like to add the code I am currently using, however with this
I am at a loss and have nothing.

Giff
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Need event for selecting a series on a chart

Giff,

AFAIK, what you describe has been and continues to be a shortcoming of the Excel object - it was the
source of my first major frustration with Excel. A workaround is to use a macro to display a
userform with a list of the names of the lines displayed for the user to select for further
processing.

HTH,
Bernie
MS Excel MVP


"Giff" wrote in message
...
I have an embedded chart in sheet 1 of my workbook. I am looking to
put together an event driven macro depending on which line from the
graph is clicked on.

I have read Chris Pearsons page on event procedures and ChartObject
objects (http://www.cpearson.com/excel/Events.aspx), however this does
not allow me to work from the SeriesCollection object.

I usually like to add the code I am currently using, however with this
I am at a loss and have nothing.

Giff



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Need event for selecting a series on a chart

Here's an article about chart events:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Giff" wrote in message
...
I have an embedded chart in sheet 1 of my workbook. I am looking to
put together an event driven macro depending on which line from the
graph is clicked on.

I have read Chris Pearsons page on event procedures and ChartObject
objects (http://www.cpearson.com/excel/Events.aspx), however this does
not allow me to work from the SeriesCollection object.

I usually like to add the code I am currently using, however with this
I am at a loss and have nothing.

Giff



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Need event for selecting a series on a chart

Jon,

Very cool. Is there a way to identify the point that is currently selected when a macro is run,
i.e., not using the mouse click event?

Bernie


"Jon Peltier" wrote in message
...
Here's an article about chart events:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Giff" wrote in message
...
I have an embedded chart in sheet 1 of my workbook. I am looking to
put together an event driven macro depending on which line from the
graph is clicked on.

I have read Chris Pearsons page on event procedures and ChartObject
objects (http://www.cpearson.com/excel/Events.aspx), however this does
not allow me to work from the SeriesCollection object.

I usually like to add the code I am currently using, however with this
I am at a loss and have nothing.

Giff





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Need event for selecting a series on a chart

Search "whichpoint" in this ng

Regards,
Peter T

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Jon,

Very cool. Is there a way to identify the point that is currently

selected when a macro is run,
i.e., not using the mouse click event?

Bernie


"Jon Peltier" wrote in message
...
Here's an article about chart events:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Giff" wrote in message
...
I have an embedded chart in sheet 1 of my workbook. I am looking to
put together an event driven macro depending on which line from the
graph is clicked on.

I have read Chris Pearsons page on event procedures and ChartObject
objects (http://www.cpearson.com/excel/Events.aspx), however this does
not allow me to work from the SeriesCollection object.

I usually like to add the code I am currently using, however with this
I am at a loss and have nothing.

Giff









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Need event for selecting a series on a chart

You have to rely on XLM for that:

Sub WhatPoint()
Dim ptSelected As Point
Dim sSelection As String
Dim iSrs As Long
Dim iPt As Long
If TypeName(Selection) = "Point" Then
Set ptSelected = Selection
sSelection = ExecuteExcel4Macro("selection()")
iSrs = Val(Mid(sSelection, 2))
iPt = Mid(sSelection, InStr(sSelection, "P") + 1)
MsgBox "You've selected Series " & iSrs & " Point " & iPt
End If
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Jon,

Very cool. Is there a way to identify the point that is currently
selected when a macro is run, i.e., not using the mouse click event?

Bernie


"Jon Peltier" wrote in message
...
Here's an article about chart events:

http://www.computorcompanion.com/LPMArticle.asp?ID=221

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Giff" wrote in message
...
I have an embedded chart in sheet 1 of my workbook. I am looking to
put together an event driven macro depending on which line from the
graph is clicked on.

I have read Chris Pearsons page on event procedures and ChartObject
objects (http://www.cpearson.com/excel/Events.aspx), however this does
not allow me to work from the SeriesCollection object.

I usually like to add the code I am currently using, however with this
I am at a loss and have nothing.

Giff







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
Selecting multiple series in pivot chart johnny Charts and Charting in Excel 3 August 9th 08 03:36 PM
Selecting part of a series for a chart? Al Charts and Charting in Excel 6 May 16th 06 12:45 PM
Chart, Series delete event sino Charts and Charting in Excel 1 March 29th 05 01:31 AM
Selecting Multiple Chart Series Mark Worthington Excel Programming 2 February 14th 04 01:11 AM
Selecting Multiple Chart Series Mark Worthington Excel Programming 0 February 13th 04 12:49 PM


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