Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to monitor the position of the mouse in a worksheet and react to
this. So when the mouse moves an event triggered which reports the x,y position and if possible the cell under the current location of the mouse. If the x,y position is recorded I would need to know the x,y limits of the worksheet and the view limit of the cells on the screen. I would be grateful for any help given. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See:
http://groups.google.com/group/micro...e7b532c96d7a1a -- Gary''s Student - gsnu200829 "ratty" wrote: I would like to monitor the position of the mouse in a worksheet and react to this. So when the mouse moves an event triggered which reports the x,y position and if possible the cell under the current location of the mouse. If the x,y position is recorded I would need to know the x,y limits of the worksheet and the view limit of the cells on the screen. I would be grateful for any help given. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is some really simple code to sample or set the mouse position:
Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Type POINTAPI x As Long y As Long End Type Declare Function SetCursorPos Lib "user32" ( _ ByVal x As Long, _ ByVal y As Long _ ) As Long Sub ShowPos() Dim lRetVal As Long Dim Pos As POINTAPI lRetVal = GetCursorPos(Pos) MsgBox Pos.x & ", " & Pos.y End Sub Sub SetPos() Dim retv As Long retv = SetCursorPos(67, 139) End Sub -- Gary''s Student - gsnu200829 "ratty" wrote: I would like to monitor the position of the mouse in a worksheet and react to this. So when the mouse moves an event triggered which reports the x,y position and if possible the cell under the current location of the mouse. If the x,y position is recorded I would need to know the x,y limits of the worksheet and the view limit of the cells on the screen. I would be grateful for any help given. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mouse Position | Excel Programming | |||
Position of the mouse pointer | Excel Programming | |||
mouse position in EXCEL | Excel Programming | |||
Mouse Position | Excel Programming | |||
position mouse cursor in msg box | Excel Programming |