Beep (statement)

<< Click to Display Table of Contents >>

Beep (statement)

Beep

Emits a short tone.

Specify the number of tones and the pause between the tones in milliseconds (e.g. 1000 for 1 second).

Example:

Declare Function Pause Lib "kernel32" ALIAS "WaitForSingleObject" ( _

 ByVal hHandle As Long, _

 ByVal dwMilliseconds As Long) As Long

Sub Beep3x

 Dim i As Integer

 For i = 1 to 3

         Beep

         Pause -1, 1000

 Next i

End Sub