I need to develop a macro on Excell(VBA) that eventually will send multiple mouseclicks and work on the selected cells. Since the sheet it will work on doensn't have a recursive pattern to work but the screen itself, mouse clicks seems to be the way.
I've browsed for information about moving the mouse cursor in VBA and it works, however the mouseclick I found only clicks on the end of the macro run, as if it was the last command of the macro.
I'm using these API's and Excell 2007
Expand|Select|Wrap|Line Numbers
- Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
- Declare Function mouse_event Lib "user32.dll" (ByVal dwflags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal dwData As Integer, ByVal dwExtraInfo As Integer) As Integer
All clicks resume to just a single click in the end of the macro.