Not in terms of cells but in terms of "twips" (I think) so that I can use that information to relocate my mouse to the active cells.
Not in terms of cells but in terms of "twips" (I think) so that I can use that information to relocate my mouse to the active cells.
I'm working in the current direction. It will reposition the mouse but not to the correct location. Any ideas where I'm going wrong?
TIA.
Bob
![]()
Type pointapi x As Long y As Long End Type Declare Function GetCursorPos Lib "user32" (lpPoint As pointapi) As Long Declare Function SetCursorPos Lib "user32" (ByVal xx As Long, ByVal yy As Long) As Long Public pos As pointapi Sub Macro1() Dim x, y As Long GetCursorPos pos MsgBox "Cursor Pos.x = " + Str(pos.x) MsgBox "Cursor Pos.y = " + Str(pos.y) x = ActiveWindow.PointsToScreenPixelsX(ActiveWindow.ActiveCell.Top) y = ActiveWindow.PointsToScreenPixelsY(ActiveWindow.ActiveCell.Left) MsgBox "activeCell.top = " + Str(x) MsgBox "activeCell.left = " + Str(y) Call SetCursorPos(x, y) End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks