View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Woodhouse[_2_] Mike Woodhouse[_2_] is offline
external usenet poster
 
Posts: 24
Default Pixel position of cell



On Oct 19, 5:55 am, Gary Smith <Gary
wrote:
Hi, I'm trying to get the pixel position of the active cell (or any cell for
that matter) so I can position the mouse cursor over it. So far I have worked
out Application.Left gives the the position of the main window,
Application.ActiveWindow.Left gives the position of the spreadsheet window
but that is relative to the client area of the main window. I'm missing how
do I get the position of the client area (the main window minus the borders,
and toolbars, etc)?

Also, I can get the position of the cell, but that is relative to the left
of the first cell, how do I get it relative to the window?


Have you looked at the .Top/.Left/.Height/.Width properties of the
Range object? I.e.