View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default I want to *beep* *beep*!!!!

Hi Rob,

Application.Wait won't give you the precision you need to space out your
beeps. You could use the Sleep API function:

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub MultiBeep(NumBeeps As Integer)
Dim Counter As Integer

For Counter = 1 To NumBeeps
Interaction.Beep
Sleep 200
Next Counter
End Sub


--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Rob wrote:
This only beeps once. I think I need to add in a line like
application.wait or something, but that didn't work, so does anyone
know what I should do? Thanks. Have a good Weekend.
Rob

Sub MultiBeep(NumBeeps)
Dim Counter
For Counter = 1 To NumBeeps
Beep
Next
End Sub