PDA

View Full Version : Different sound file question - simple ??



bdsii
10-08-2009, 06:33 PM
I have seen the different posts on playing a sound when a file is opened and those when an event occurs such as a cell reaching a certain value.

I have not been able to find instructions on how to cause a sound file to play from inside a macro when called.

Would I need code in the ThisWorkbook portion and code inside the macro or have a separate macro for the sound file and then call the sound macro from inside the main macro ? This seems to be a simpler instance for a sound file but have not seen a post covering this.

Since I am new to VBA please be specific if anything needs to go into the macro and what if anything needs to go into the ThisWorkbook thingee....

Oh, and can the soundfile be embedded into the excel file and if so, how does that change the coding required ??

Any help would be appreciated !




thanks!

mdmackillop
10-09-2009, 04:26 AM
Does this work for you? Also, have a look at this (http://vbaexpress.com/forum/showthread.php?t=8736).