this should be pretty simple.
Declare PtrSafe Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
I was capturing the mouse position with GetCursorPos, and I noticed that it would always treat the y value as zero.
So I put in manual coordinates, and it still does the same thing.
Sub Setcursor()
SetCursorPos 300, 100
End Sub
whatever I change the x value to (first value) works fine going across the screen horizontally. Vertically, any number I put in is treated as 0.
I'm using this in a userform.
Declare PtrSafe Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
I was capturing the mouse position with GetCursorPos, and I noticed that it would always treat the y value as zero.
So I put in manual coordinates, and it still does the same thing.
Sub Setcursor()
SetCursorPos 300, 100
End Sub
whatever I change the x value to (first value) works fine going across the screen horizontally. Vertically, any number I put in is treated as 0.
I'm using this in a userform.
Last edited: