WAV Files
I have a macro to play a wav file; however, I only want to play the first 30
seconds from it. Is there a way to modify my macros (see below) to stop after 30 seconds? Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Sub GameOver() Call sndPlaySound32("C:\Sounds\Gameover.wav", 0) End Sub |
WAV Files
Playing a wav file is an all or nothing proposition. The easiest solution
would be to modify the wav file (using any number of downloads from the internet) to only contain the first 30 seconds... -- HTH... Jim Thomlinson "Paige" wrote: I have a macro to play a wav file; however, I only want to play the first 30 seconds from it. Is there a way to modify my macros (see below) to stop after 30 seconds? Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Sub GameOver() Call sndPlaySound32("C:\Sounds\Gameover.wav", 0) End Sub |
WAV Files
Thanks, Jim; will do!
"Jim Thomlinson" wrote: Playing a wav file is an all or nothing proposition. The easiest solution would be to modify the wav file (using any number of downloads from the internet) to only contain the first 30 seconds... -- HTH... Jim Thomlinson "Paige" wrote: I have a macro to play a wav file; however, I only want to play the first 30 seconds from it. Is there a way to modify my macros (see below) to stop after 30 seconds? Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Sub GameOver() Call sndPlaySound32("C:\Sounds\Gameover.wav", 0) End Sub |
All times are GMT +1. The time now is 02:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com