CTRL-BREAK (that will actually interrupt and stop your code, but I doubt that is what you are after).
I don't know if that is possible because usually your code is either pausing as it is waiting for you to input something (like through an Input Box or Message Box), or it is running constantly and not looking for an input. I never heard of code running and looking for an input at the same time.
Maybe if you explain exactly what you are trying to do in detail, there is another solution we can offer.
alright well, I think I have away around the loop then.
example: I have a loop and it gets my cursors position if my cursor position is equal to the same position a number of times it gets out of the loop. I now want it so that if my cursor moves again it goes back into the loop.
is there a way to recognize keystrokes or movements in a workbook.
if I hit the letter E I want it to do something (non loop here just in general I hit the letter E). Same with cursor movement above. I can get out of a loop but how can i get back in
Right-mouse button down = &H2
Left-mouse button down = &H1
I also noticed that you are trying to use this API to detect mouse movement and from what I read, this API is not designed for that. You will need to research an alternative. I do not have this information, sorry.