Button to stop a loop

  • I have a form that sets a timer. Here is the code for the form

    What I'm trying to do is run a sound in a loop as an alarm.
    This I can do fine with the following code

    However, I'd like to have a button to stop this alarm. At the moment all I seem to be able to do is break the running code. I've tried opening a userform with a stop button but the userform opens and the alarms aren't activated until it's closed. I've included all my relevant code including the reference to FRM_StopAlarm which is currently commented out.
    Even if you no-one can offer a solution, then maybe someone can get some ideas and use this code

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!