View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default 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" wrote in
message ...

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