Re: Mouse pointer position, excel2002
- From: paul.robinson@xxxxxxxxxxxxxx
- Date: 23 May 2005 09:20:49 -0700
'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
.
- References:
- Mouse pointer position, excel2002
- From: tc
- Mouse pointer position, excel2002
- Prev by Date: Re: Excel forgets Custom VBA Function (#Name error)
- Next by Date: command bar problem
- Previous by thread: Mouse pointer position, excel2002
- Next by thread: Programatically control picture property of Image control
- Index(es):
Relevant Pages
|