Excel XP x Playing Sounds

  • Thread starter Thread starter Paulo de Arruda Borelli
  • Start date Start date
P

Paulo de Arruda Borelli

I need to play some very simple sounds on Excel XP. All that I need is to
supply Excel with a frequency and a duration. That's all. How can this be
done? The Visual Basic Help under Excel tells me that the sound functions
have been removed from Excel! The only one that remained is beep, which is
far from what I need.

Thank you!
Paulo.
 
Here is a possibility that you might be able to adapt to your needs. This
is an old post I made:

From: Tom Ogilvy ([email protected])
Subject: Re: N beeps per second
View: Complete Thread (6 articles)
Original Format
Newsgroups: microsoft.public.excel.programming
Date: 2003-01-02 20:11:28 PST

I checked this in the API reference. The below will work for Win NT, Win
2000 and Win XP, but in Win 95/ Win 98/ and ME, the two arguments are
ignored - so it won't work in those versions.

Regards,
Tom Ogilvy
 
Thank you very much! it's working!

Also: would it be possible to play a two-frequency tone with the Beep
function?

Thank you
Paulo Borelli.
 
You mean simultaneously? I doubt it with that function as I see no
provision for it. I think you are getting into programming the sound card
to do something like that, but I really am no expert in the area of sound.
You might find it easier to get your tone in a wav file and play that.

http://support.microsoft.com/default.aspx?scid=kb;en-us;158140
XL: How to Play Sounds Using Visual Basic for Applications

http://support.microsoft.com/default.aspx?scid=kb;en-us;149777
XL: How to Play a Warning Sound If Critical Value Is Exceeded

http://support.microsoft.com/default.aspx?scid=kb;en-us;86281
HOWTO: Play a Waveform (.WAV) Sound File in Visual Basic
[Contains the Constants for the Arguments]

http://support.microsoft.com/default.aspx?scid=kb;en-us;170730
WD: How to Play a .wav Sound File by Using a Macro

http://support.microsoft.com/default.aspx?scid=kb;en-us;211842
WD2000: How to Play a .wav Sound File Using a Macro

http://support.microsoft.com/default.aspx?scid=kb;en-us;193223
HOWTO: Use the MessageBeep API to Play System .WAV Files
 
Back
Top