Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Sounds in Excel

Is there any way to get excel to play wav sounds on events?
I noticed that the standard VB functions for sounds are not available
in the VBA help section, was just wondering if you could call a
windows api to do it or something.
Thanks,
-Joel
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Sounds in Excel

Thank-you Sir!


"Chip Pearson" wrote in message ...
Joel,

Yes, you can use an API call to play a wav file. See
http://www.cpearson.com/excel/excelM.htm#PlayWAV for details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"J. Vandenberg" wrote in message
om...
Is there any way to get excel to play wav sounds on events?
I noticed that the standard VB functions for sounds are not available
in the VBA help section, was just wondering if you could call a
windows api to do it or something.
Thanks,
-Joel

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Sounds in Excel

By the way, I did a search for this but didn't find the articles
attached.
Must have done something wrong, thanks again for answering an old
quesiton.

One follow up I have (as long as I am typing) I noticed that when it
is executing the sound, that the code waits for it to finish, I was
hoping that since it was a call to an api that it would make the call
and move on. Is there a way to have it sort of "let go" of it and
continue on and let the api play the sound without having to finish it
to get to the next line?

Hmmm... Does that make sense?

Your help is greatly appreciated.
-Joel


"Chip Pearson" wrote in message ...
Joel,

Yes, you can use an API call to play a wav file. See
http://www.cpearson.com/excel/excelM.htm#PlayWAV for details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"J. Vandenberg" wrote in message
om...
Is there any way to get excel to play wav sounds on events?
I noticed that the standard VB functions for sounds are not available
in the VBA help section, was just wondering if you could call a
windows api to do it or something.
Thanks,
-Joel

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Sounds in Excel

Joel,

You can play the sound "asynchronously", meaning that execution will
continue as soon as the sound begins to play rather than waiting for the
sound to finish, by changing the second argument of the function from 0 to
1.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com


"J. Vandenberg" wrote in message
om...
By the way, I did a search for this but didn't find the articles
attached.
Must have done something wrong, thanks again for answering an old
quesiton.

One follow up I have (as long as I am typing) I noticed that when it
is executing the sound, that the code waits for it to finish, I was
hoping that since it was a call to an api that it would make the call
and move on. Is there a way to have it sort of "let go" of it and
continue on and let the api play the sound without having to finish it
to get to the next line?

Hmmm... Does that make sense?

Your help is greatly appreciated.
-Joel


"Chip Pearson" wrote in message

...
Joel,

Yes, you can use an API call to play a wav file. See
http://www.cpearson.com/excel/excelM.htm#PlayWAV for details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"J. Vandenberg" wrote in message
om...
Is there any way to get excel to play wav sounds on events?
I noticed that the standard VB functions for sounds are not available
in the VBA help section, was just wondering if you could call a
windows api to do it or something.
Thanks,
-Joel





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sounds in Excel

You can play the sound asynchronously. See the first article for the
argument to supply the API:

http://support.microsoft.com/default...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...b;en-us;158140
XL: How to Play Sounds Using Visual Basic for Applications

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


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

http://support.microsoft.com/default...b;en-us;211842
WD2000: How to Play a .wav Sound File Using a Macro

--
Regards,
Tom Ogilvy


"J. Vandenberg" wrote in message
om...
By the way, I did a search for this but didn't find the articles
attached.
Must have done something wrong, thanks again for answering an old
quesiton.

One follow up I have (as long as I am typing) I noticed that when it
is executing the sound, that the code waits for it to finish, I was
hoping that since it was a call to an api that it would make the call
and move on. Is there a way to have it sort of "let go" of it and
continue on and let the api play the sound without having to finish it
to get to the next line?

Hmmm... Does that make sense?

Your help is greatly appreciated.
-Joel


"Chip Pearson" wrote in message

...
Joel,

Yes, you can use an API call to play a wav file. See
http://www.cpearson.com/excel/excelM.htm#PlayWAV for details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"J. Vandenberg" wrote in message
om...
Is there any way to get excel to play wav sounds on events?
I noticed that the standard VB functions for sounds are not available
in the VBA help section, was just wondering if you could call a
windows api to do it or something.
Thanks,
-Joel



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO I PUT SOUNDS IN EXCEL Kellsangel1952 Excel Discussion (Misc queries) 2 May 8th 07 05:11 PM
Excel Sounds donpauleon Excel Discussion (Misc queries) 2 July 25th 06 07:49 AM
sounds in Excel Green Wizard Excel Discussion (Misc queries) 2 March 9th 06 05:26 PM
Excel Sounds Trojan Excel Discussion (Misc queries) 5 November 20th 05 09:42 AM
Excel XP x Playing Sounds Paulo de Arruda Borelli Excel Programming 1 August 11th 03 07:51 PM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"