PDA

View Full Version : Return mouse pointer position in Excel notation while hovering



Dadmin
11-19-2008, 08:45 PM
Since this is my first post, my question has probably been asked for the umpteenth time, but here goes anyway.
I already know about the GetCursorPos Lib "user32" API function, but it only returns the mouse pointer position relative to the top left corner of the display screen, in pixel coordinates. Somehow, Excel knows what cell the pointer is hovering over BEFORE the mouse is clicked, because the cell becomes selected AFTER the mouse is clicked. I would like to return the cell reference BEFORE the mouse is clicked. How does Excel do it? Thanks for any help you can offer.