+ Reply to Thread
Results 1 to 6 of 6

Finding the x y coordinates by using mouse over.

  1. #1
    Registered User
    Join Date
    07-07-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    15

    Finding the x y coordinates by using mouse over.

    Hi all, I am extremely sorry if I have his placed this in the wrong place or even if this has been answered already.

    I am trying to construct a mouse over/cross hair type of function on a chart within Excel.
    I have tried to use various bits of code but have not managed to get it working. I've tried using the methods as recommended by both Andy Pope and Jon. However, although I have managed to gain some success it does not seem to do what I need. At the moment I have a mouse-over function that displays a series name, the coordinates of the closest data point and the x y pixel placement.

    What I am trying to achieve is for a mouse over style of cross hair to display the following above the chart area in separate cells:
    the name of the relevant series
    the y co-ordinate (number of units)
    the x co-ordinate (days)

    I have tried to display this on the attached mock up .jpg

    I would greatly appreciate any help

    Mock-up.jpg
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-07-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Finding the x y coordinates by using mouse over.

    Anyone got anything?

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

    Re: Finding the x y coordinates by using mouse over.

    Rather than battle against the inadequate mouse events why not have the crosshair move via controls.
    http://www.andypope.info/ngs/ng26.htm
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    07-07-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Finding the x y coordinates by using mouse over.

    Hi Andy, thanks for the reply. I have looked into moving the cross-hairs via controls. However, its not what is needed in this case. I
    need the cross-hair to be based on the position of the cursor. I seem to be having some success at the moment with combining cross-hair
    with chart events. So wish me luck

    Thanks for the help though

    Regards

  5. #5
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Finding the x y coordinates by using mouse over.

    Maybe you could use the code in this thread -

    http://www.mrexcel.com/forum/showthr...el-Application

    It displays a full screen crosshair, but should be adaptable to display the size you want.
    Post responsibly. Search for excelforum.com

  6. #6
    Registered User
    Join Date
    07-07-2012
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Finding the x y coordinates by using mouse over.

    Hi Chippy, thanks a lot for the link, it turned out to be really helpful, I am still in the process of changing the cross hair location from pixels to coordinates. Hopefully should be done in the next couple of days :D

    thank you for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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