I was playing about with your problem but I couldn't get it to work for the beep sound. So I used the Application.Speech() function. See if this will give you any ideas.
Open a new Excel workbook.
Press Alt+F11.
Click Insert => Module
Copy and paste the code.
Press F5 to run ESC to abort
Code:
[COLOR=darkblue]Sub[/COLOR] TestAlarm() [COLOR=green]'==================[/COLOR]
[COLOR=green]'press ESC to abort[/COLOR]
[COLOR=green]'==================[/COLOR]
[COLOR=darkblue]Dim[/COLOR] i [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Long[/COLOR]
[COLOR=darkblue]Dim[/COLOR] answer [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Long[/COLOR]
[COLOR=darkblue]On[/COLOR] [COLOR=darkblue]Error[/COLOR] [COLOR=darkblue]GoTo[/COLOR] errExit
[COLOR=darkblue]For[/COLOR] i = 1 [COLOR=darkblue]To[/COLOR] 50
Application.Speech.Speak ("Danger")
[COLOR=darkblue]Next[/COLOR] i
[COLOR=green]'abort or continue[/COLOR]
errExit:
[COLOR=darkblue]If[/COLOR] MsgBox("Continue", vbYesNo) = vbNo [COLOR=darkblue]Then[/COLOR]
[COLOR=darkblue]Exit[/COLOR] [COLOR=darkblue]Sub[/COLOR]
[COLOR=darkblue]Else[/COLOR]
[COLOR=darkblue]Resume[/COLOR] [COLOR=darkblue]Next[/COLOR]
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]If[/COLOR]
End [COLOR=darkblue]Sub[/COLOR]