Look up using the OnTime method.

In the macro itself you would use the OnTime method at the end to set a timer to run itself again in 10 seconds. Right before that line of code, put some sort of "test" that allows the macro to know when it's time to abort and not run that last line of code to set the timer again.

Also, create a macro to turn off the timer. Searching for OnTime should reveal all of these methods and millions of examples.