Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greg Wilson - XY coordinates of a worksheet
Greg Wilson ....
You mentioned a function to determine the X-Y coordinates of a worksheet in the following post. The link does not work any longer - do you still have the example available? _______________________________ "The code below will return the x- and y-coordinates in pixels as opposed to points. Note that it is also window based instead of worksheet based. Doing something with it is the challenge: Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Type POINTAPI x As Long y As Long End Type Sub xxx() Dim pos As POINTAPI GetCursorPos pos MsgBox pos.x & vbCr & pos.y End Sub I have recently posted code that determines the position of the top- left corner of the worksheet in pixels and also converts pixels to points and compensates (albeit not perfectly) for zoom. You need to know the position of the top-left corner of the worksheet in pixels so that you can subtract the correct offsets if you are to convert to points. You can thus direct the cursor to a specified point within the worksheet. If you're interested: http://tinyurl.com/l7uog " |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
GREG I need your expertise again | Excel Discussion (Misc queries) | |||
Using Air Coordinates in a Worksheet | Excel Worksheet Functions | |||
Simple way to convert UTM ED50 coordinates to decimal coordinates? | Excel Programming | |||
Converting MouseDown Coordinates to Chart Point Coordinates | Excel Programming | |||
A MAJOR LEAGUE THANKS TO JOHN WILSON | Excel Programming |