I'm writing a "Bleep Test" application for Athletics fitness testing. It all works fine the Timer function runs for a specified number time using a Do While loop and then the mighty fine "Beep" function lets out its beep and the next wait goes on and the beep etc etc. The test runs for about 25 minutes through 23 Levels.
Code Snippet
For X = 1 To 7
PauseTime = 8.471 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
Range("A" & X).Value = TotalTime
Range("B" & X).Value = "Level 1"
Range("C" & X).Value = "Split " & X
If X < 7 Then Beep Else MultiBeep
Range("H18").Value = 1
Range("H20").Value = X
Next X
Counter = 7
I wanted to be able to stop the Bleep Test with another button on the page BUT the first Macro is already running so it ignores the button press to stop execution. Any ideas?
Thanks
Code Snippet
For X = 1 To 7
PauseTime = 8.471 ' Set duration.
Start = Timer ' Set start time.
Do While Timer < Start + PauseTime
Loop
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
Range("A" & X).Value = TotalTime
Range("B" & X).Value = "Level 1"
Range("C" & X).Value = "Split " & X
If X < 7 Then Beep Else MultiBeep
Range("H18").Value = 1
Range("H20").Value = X
Next X
Counter = 7
I wanted to be able to stop the Bleep Test with another button on the page BUT the first Macro is already running so it ignores the button press to stop execution. Any ideas?
Thanks