+ Reply to Thread
Results 1 to 3 of 3

get cursor position when clicking on an image

  1. #1
    Registered User
    Join Date
    03-02-2006
    Posts
    17

    get cursor position when clicking on an image

    I want to be able to insert an image, say a jpeg or bmp, into a worksheet. Then, I want to be able to click on a spot on that image and have Excel record the X,Y coordinates where I clicked. I need to click on several spots on an image and record the X,Y coordinates of each spot, then determine the distance between spots. Any ideas?

  2. #2
    NickHK
    Guest

    Re: get cursor position when clicking on an image

    timspier,
    Whilst you could assign a macro to the picture, you would somehow have to
    translate the current mouse coordinates into those relative to picture.

    Images on worksheets don't have events, but the image control does. You get
    the coordinates in the Image1_MouseDown event.
    Set it to .Autosize=true, so no blank space.

    NickHK

    "timspier" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I want to be able to insert an image, say a jpeg or bmp, into a
    > worksheet. Then, I want to be able to click on a spot on that image and
    > have Excel record the X,Y coordinates where I clicked. I need to click
    > on several spots on an image and record the X,Y coordinates of each
    > spot, then determine the distance between spots. Any ideas?
    >
    >
    > --
    > timspier
    > ------------------------------------------------------------------------
    > timspier's Profile:

    http://www.excelforum.com/member.php...o&userid=32090
    > View this thread: http://www.excelforum.com/showthread...hreadid=518452
    >




  3. #3
    Registered User
    Join Date
    03-02-2006
    Posts
    17
    Hey, great idea! I looked into this, looks like it might work. Thanks!

+ 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