+ Reply to Thread
Results 1 to 3 of 3

use mouseclick to dynamically change chart series? Chart_beforeDoubleClick?

Hybrid View

  1. #1
    KR
    Guest

    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



  2. #2
    excelent
    Guest

    RE: use mouseclick to dynamically change chart series? Chart_beforeDou

    put in sheets kode window:

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    Boolean)
    MsgBox ("Double click on cells ") & ActiveCell.Address
    End Sub


  3. #3
    KR
    Guest

    Re: use mouseclick to dynamically change chart series? Chart_beforeDou

    While this code works for clicking on the worksheet, my goal is to do this
    by clicking on the graph itself to drill down through the data.
    So I'm still back to trying to figure out the following, until/unless anyone
    can give other options?

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

    Thanks!
    Keith

    "excelent" <excelent@discussions.microsoft.com> wrote in message
    news:88836891-7D60-448C-AC1A-BAD9B5F98A8F@microsoft.com...
    > put in sheets kode window:
    >
    > Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
    > Boolean)
    > MsgBox ("Double click on cells ") & ActiveCell.Address
    > End Sub
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1