+ Reply to Thread
Results 1 to 8 of 8

I want to double click on a segment of the piechart like a macro/hyperlink

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    I want to double click on a segment of the piechart like a macro/hyperlink

    i am trying to have a pie chart on my spread sheet, where each segment acts as a macro/hyperlink so that when I click/double click on it, it opens up a file.

    I tried to use the shapename application caller in vba to address this but you cant figure out the name of a SEGMENT , just the entire graph.

    is this possible?

  2. #2
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    Hi there,
    You can perfectly manage that when you move Your chart from excel sheet to chart sheet.
    There are many options (events) you can manage via VBA on chart sheet.
    For example, You can use 'BeforeDoubleclick' or my favourite 'Mousemove' event.

    It is worth a look (maybe a little workout how to process all the arguments will be necessary)

    Hope it helps

    M

  3. #3
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    I can achieve rollover mouse effects on cells - is it the same?

    got to be honest, I don't know what you mean by a chart sheet? how do I get into that mode?

  4. #4
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    No. It is not possible to have a mousemove event on regular excel sheet (the sheet with cells :-) ). At least not without activated coursor API (but so far I know, coursor API knows only the possition of coursor on the screen, but not the cell range).
    Mostly I use doubleclick event on excel sheet (this event contain 'Target' range - or if You want the range of cell you doubleclicked) and with a little testing for target.row and target.column, you it can be folowed by any procedures You want.

    Chart sheet:
    You have source data in cells on sheet. When You create a chart by default it appears on the same sheet - it is a object in sheet. But there is an option to move this chart to new sheet - chart sheet ('move chart' in chart right click menu). On this new sheet, the chart is displayed in full screen mode and have many new options as described in my first reply.

    Hope I wrote it understandable.

    M

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    For a chart object you need to create a class to capture the events.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  6. #6
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    @andy - wow your a lot better at this than me lol

  7. #7
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    miroslav - you CAN do a mouseover effect in regular excel sheet - on the cells (not chart).... ive done it

  8. #8
    Registered User
    Join Date
    09-02-2015
    Location
    Prague
    MS-Off Ver
    2013
    Posts
    4

    Re: I want to double click on a segment of the piechart like a macro/hyperlink

    Andy this is great. I am googling this for last 3 hours..Many thanks!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing cell properties with double click, then revert with another double click
    By mweber2525 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-01-2014, 01:40 PM
  2. DOUBLE Click Macro or VBA
    By ganderson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2011, 11:45 AM
  3. use of double click to run macro
    By Healthwatch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2009, 08:32 AM
  4. Double click to run a macro
    By famdamly in forum Excel General
    Replies: 3
    Last Post: 03-27-2007, 03:19 PM
  5. Run macro on double click only
    By famdamly in forum Excel General
    Replies: 2
    Last Post: 02-27-2006, 08:20 AM

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