View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 1,327
Default How BEEP on internal speakers, not on sound-card?

Hi

A search on this
http://makeashorterlink.com/?D24E42426
showed among lots of things this:

" In VB, the Beep function calls the Windows Exclamation sound, so if you
have a sound card driver installed, the sound will be emitted by the
sound card.

" If your app is being run under WinNT4, Win2000, or WinXP, you can use the
Beep API function to play a sound using the internal speaker. Win9x does
not support this (like VB's Beep statement, the Beep API function under
Win9x only plays the Default Sound .wav file).

Private Declare Function Beep Lib _
"kernel32" (ByVal dwFreq As Long, _
ByVal dwDuration As Long) As Long

Sub BeepMe()

Dim frequency As Long
Dim duration As Long

frequency = 1600
duration = 500

Call Beep(frequency, duration)

End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Tom Ogilvy" wrote in message ...
The beep command doesn't work?

the help says:

Sounds a tone through the computer's speaker.

--
Regards,
Tom Ogilvy


"Michel" wrote in message
om...
How can I sound (beep) the pc internal speaker without the soundcard-out?
Using VBA in MS Excel under Win98se?

Like to warn Excel-user, not the whole room playing online radio.

Thanks.