LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default use mouseclick to dynamically change chart series? Chart_beforeDoubleClick?

I'm trying to hack a solution to allow dynamic, graphical drill-down into a
data source. I'm thinking a pie chart, where you click on a wedge, and the
pie chart changes to show all the component pieces of that wedge, etc. I'd
prefer a pie chart embedded in a worksheet, but I could make do with a chart
sheet if needed. I can probably figure out how to dynamically update my
ranges, if someone can tell mehow to determine which data element has been
clicked.

e.g.: Chart shows Revenue from meat, fruit, dairy, breads
<click on dairy
Chart now shows Revenue from milk, eggs, cheese, butter
<click on cheese
Chart now shows Revenue from Cheddar, Mozerella, Colby, Swiss
<click on cheddar
Chart now shows Revenue from sliced, bar, shredded (8oz), shredded (16oz)

I tried using the following code from a MS website, in the hopes that I
could eventually figure out which series & data point had been clicked, so I
could update the source data via VBA and update the graph, but it isn't
giving me a messagebox, so my clicking on the chart isn't having the
intended effect.

Sub Chart_BeforeDoubleClick(ByVal ElementID As Long, _
ByVal Arg1 As Long, ByVal Arg2 As Long, Cancel As Boolean)
MsgBox "Test"
End Sub

I'd appreciate any advice or pointers!
Thanks,
Keith


 
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
Dynamically change data in chart title Bill James Charts and Charting in Excel 2 January 9th 08 05:17 AM
How to dynamically change the series range of a chart ? ptek Charts and Charting in Excel 2 October 5th 06 04:42 AM
Change Chart Series with VBA Sueann Excel Programming 2 May 17th 06 09:57 PM
Change series in a chart trispirit32 Charts and Charting in Excel 2 July 26th 05 06:45 PM
Dynamically change column color in chart Everett[_2_] Excel Programming 1 August 7th 03 02:00 AM


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