I am controlling another application using VBA and need to send a left mouse click however when I set the cursor position using SetCursorPos x,y the external application does not like data that is input at this location. If I drag the mouse to this exact same location and do a manual left mouse click then entered data is properly read by the external application. I know that the problem is with the SetCursorPos function as when I stop my VBA code after this step I experience the same issue irrespective if I send a mouse click via VBA or sending it manually.
The external app only seems to like a cursor that is dragged across the screen to a final location rather than automatically positioned at the final location.
Is there a VBA code that will drag the mouse across the screen or any other suggestions to resolve this frustrating issue. I tried moving the cursor across the screen in pixel increments but the same issue occurs.
Cheers
Bookmarks