Home |
Search |
Today's Posts |
#14
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ah, the brackets, how observant. Aircode I'm afraid but they were there by
intention! Trust the demo worked, but please advise if anything not quite right. Regards, Peter T "Andrew" wrote in message ... Embarrassingly I failed to compute that top of A1 is just 0!! Too busy thinking about everything else. BTW, there's a bracket missing in your expression below though. Should be: (CursorPixelsX - PointsToScreenPixelsX(0)) * ppp * zoom% since it's the distance from top left of A1 to the cursor which changes with zoom etc. (I know you know this since it is what you have in your code that you posted later). Thanks! On 10 Feb, 13:28, "Peter T" <peter_t@discussions wrote: I think you may be missing one or two things (not sure), in essence the position of the mouse pointer in points from the top-left corner of the sheet is CursorPixelsX - PointsToScreenPixelsX(0) * ppp * zoom% where CursorPixelsX is returned from 'GetCursorPos' and ppp refers to 'Points-per-Pixel' typically 0.75 but confirmed with a few API calls. There are one or two other things that might also need to be taken into account. Having had another look at some old stuff I should be able to post a simple demo here later today, rather than something needing to be wrapped in a workbook. Regards, Peter T <snip |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to get position of mouse via VB in a worksheet | Excel Programming | |||
Mouse Position | Excel Programming | |||
Position of the mouse pointer | Excel Programming | |||
Mouse Position | Excel Programming | |||
position mouse cursor in msg box | Excel Programming |