Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

how to sound a tone

  Asked By: Carole    Date: Jan 10    Category: MS Office    Views: 941
  

I want to sound a .wav tone when a certain value is generated. I've
found the .wav file I want in the \Windows\media subdirectory, but in
checking VBA help from the VBE, it says that the

"This property should not be used. Sound notes have been removed from
Microsoft Excel", when I look at the CanPlaySounds property, SoundNote
object and Play method.

Is there no way to sound a loud ring in VBA?

Share: 

 

6 Answers Found

 
Answer #1    Answered By: Sally Pierce     Answered On: Jan 10

VBA has a Beep statement which you could use. It will use the default system
sound for the Beep Notify event. In script, you can do the same thing by
echoing Chr(7).

 
Answer #2    Answered By: Erma Henry     Answered On: Jan 10

I need a loud, attention-getting sound. The beep occurs throughout the
day for one reason or another and would not grab my attention. That's
why I want to use this particular .wav file. Since it is a MS standard
tone, I'd think Excel would accomodate it.

Do you know if other tones can be used?

 
Answer #3    Answered By: Fabiola Ferrrari     Answered On: Jan 10

as a maybe not very satisfactory workaround, but you could change the
default tone to any .WAV file  you like. Then Beep will play  that instead of
the default. There may even be an API to alter the default sound  to what you
want ... then Beep .. then alter it back to normal.

 
Answer #4    Answered By: Edith Mcdonald     Answered On: Jan 10

just found this....

support.microsoft.com/default.aspx

Looks to be what you want I think.

 
Answer #5    Answered By: Blas Fischer     Answered On: Jan 10

This is very similar to the link I was referred to earlier, from J.
Walkenbach's site. I modified the function declaration to be public,
made subroutine to play  the tone, and put the call in a conditional
statment in two different routines in this workbook. Both work fine.

 
Answer #6    Answered By: Tara Ryan     Answered On: Jan 10
 
Didn't find what you were looking for? Find more on how to sound a tone Or get search suggestion and latest updates.




Tagged: