![]() |
How to use mouse events inside an Excel Sheet ?
Hi,
I would like to use mouse events (like MouseMove) at ExcelSheet level. How can I do that, if I can? |
How to use mouse events inside an Excel Sheet ?
Mike,
What are you trying to do? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "mike" wrote in message ... Hi, I would like to use mouse events (like MouseMove) at ExcelSheet level. How can I do that, if I can? |
How to use mouse events inside an Excel Sheet ?
Bob,
I'm trying to control mouse movements over an excel sheet. Specifically: I'd like to trigger an action when I'm over a specific cell. Could be possible? thanks! -----Original Message----- Mike, What are you trying to do? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
How to use mouse events inside an Excel Sheet ?
The problem is that the mousemovement, which can be done with APIs, return
an x & y co-ordinate relative to the screen, not a cell position. It might be possible to get the Excel app position and the window position and work out the cell from all of this, but it sounds more effort than it is worth. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "mike" wrote in message ... Bob, I'm trying to control mouse movements over an excel sheet. Specifically: I'd like to trigger an action when I'm over a specific cell. Could be possible? thanks! -----Original Message----- Mike, What are you trying to do? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
How to use mouse events inside an Excel Sheet ?
Well,
If there is a possibility to connect, even across API, a mouse event with an excel object (application ...), please, would you tell me how it can be done? Mike -----Original Message----- The problem is that the mousemovement, which can be done with APIs, return an x & y co-ordinate relative to the screen, not a cell position. It might be possible to get the Excel app position and the window position and work out the cell from all of this, but it sounds more effort than it is worth. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
How to use mouse events inside an Excel Sheet ?
I can give you some code that shows the mouse x/y position in the statusbar.
As I said, this is the screen co-ordinate, not the Excel relative co-ordinates. Is that any use to you (it's complex)? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "mike" wrote in message ... Well, If there is a possibility to connect, even across API, a mouse event with an excel object (application ...), please, would you tell me how it can be done? Mike -----Original Message----- The problem is that the mousemovement, which can be done with APIs, return an x & y co-ordinate relative to the screen, not a cell position. It might be possible to get the Excel app position and the window position and work out the cell from all of this, but it sounds more effort than it is worth. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
How to use mouse events inside an Excel Sheet ?
Thank you Bob,
But, I didn't see the code ... !!!??? I made something in this direction using SetWindowLong, GetCursorPos, CallWindowProc, but the message received isn't WM_MOUSEMOVE but a value of 32 and I don't know which message is that! If you can send me the code I'd be grateful! Thanks again, Mike -----Original Message----- I can give you some code that shows the mouse x/y position in the statusbar. As I said, this is the screen co-ordinate, not the Excel relative co-ordinates. Is that any use to you (it's complex)? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
How to use mouse events inside an Excel Sheet ?
thanks Bob,
I've written the code by myself. The only problem which stays is that when arrives at the upper part of the window hangs and I have to minimize and maximize the excel window subsequently to reobtain the control on it. For your information I have used "RangeFromPoint" excel function to obtain the range (or the shape) at that specific screen point. Thank you again, Mike -----Original Message----- I can give you some code that shows the mouse x/y position in the statusbar. As I said, this is the screen co-ordinate, not the Excel relative co-ordinates. Is that any use to you (it's complex)? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
All times are GMT +1. The time now is 07:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com