Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?


--
timspier
------------------------------------------------------------------------
timspier's Profile: http://www.excelforum.com/member.php...o&userid=32090
View this thread: http://www.excelforum.com/showthread...hreadid=518452

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default get cursor position when clicking on an image


Hey, great idea! I looked into this, looks like it might work. Thanks!


--
timspier
------------------------------------------------------------------------
timspier's Profile: http://www.excelforum.com/member.php...o&userid=32090
View this thread: http://www.excelforum.com/showthread...hreadid=518452

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cursor position MarkT Excel Discussion (Misc queries) 5 February 7th 07 02:25 PM
Cursor Position in VBE ehntd[_5_] Excel Programming 0 November 3rd 04 09:44 AM
clicking on an image Srikanth Ganesan[_2_] Excel Programming 1 October 29th 04 04:21 AM
cursor position NTL Excel Programming 1 January 18th 04 09:23 PM
Image set transparent becomes opaque on clicking it Simon Lenn Excel Programming 1 December 23rd 03 05:09 AM


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Đ2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"