Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mouse pointer position, excel2002
I give up. How do I retrieve the x-y coordinates of the HotSpot within the
active window? I've been struggling with this forever. Tony Rizzo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Mouse pointer position, excel2002
'Put this bit at the top of your code window:
Declare Function GetUserName Lib "ADVAPI32.DLL" Alias "GetUserNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long 'adapted from a sub by Vasant 'used by Module_PopUp sub to get the mouse coordinates when a cell is clicked Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Type POINTAPI X As Long Y As Long End Type 'used by Module_PopUp sub to get the mouse coordinates when a cell is clicked Function ShowPos() As Variant Dim lRetVal As Long Dim Pos As POINTAPI Dim TempArray(1 To 2) As Long lRetVal = GetCursorPos(Pos) TempArray(1) = Pos.X TempArray(2) = Pos.Y ShowPos = TempArray End Function regards Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell pointer position | Excel Discussion (Misc queries) | |||
mouse pointer | Excel Discussion (Misc queries) | |||
Comment Box Position & Pointer | Excel Discussion (Misc queries) | |||
Pointer position on opening | Excel Discussion (Misc queries) | |||
mouse pointer | Excel Programming |