Hi, is it possible to get excel to move the mouse pointer by 1 pixel at an interval I can set.
I have found code on the board to find out where it is, which I have put below. I know how to use the timer, to get it going when I want but don't know how to physically move the thing,
Thanks in advance
Gary
Option Explicit
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Sub WhereAmI()
Dim pTargetPoint As POINTAPI
Dim lRetVal As Long
lRetVal = GetCursorPos(pTargetPoint)
MsgBox "My Position:" & vbLf & pTargetPoint.x & "," & pTargetPoint.y
End Sub
I have found code on the board to find out where it is, which I have put below. I know how to use the timer, to get it going when I want but don't know how to physically move the thing,
Thanks in advance
Gary
Option Explicit
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Sub WhereAmI()
Dim pTargetPoint As POINTAPI
Dim lRetVal As Long
lRetVal = GetCursorPos(pTargetPoint)
MsgBox "My Position:" & vbLf & pTargetPoint.x & "," & pTargetPoint.y
End Sub