I am trying to write an Excel macro that calls a series of sounds based on the content of three cells. I have succeeded in doing that.
What I need to do now is play one of those sounds, then simultaneously play the others in sequential order.
Here is the code I presently have:
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub PlaySound()
'Substitute the path and filename of the sound you want to play
Call sndPlaySound32("c:\cdrombb\player\excel\theme\themebasicxx.wav", 0)
'While that sound is playing, I want to play the following ones sequentially
Call sndPlaySound32("c:\cdrombb\player\excel\theme\silence16.wav", 0)
Call sndPlaySound32("c:\cdrombb\player\excel\theme\" & Sheets(1).Range("AJ6").Text & ".wav", 0)
Call sndPlaySound32("c:\cdrombb\player\excel\theme\heres.wav", 0)
Call sndPlaySound32("c:\cdrombb\player\excel\theme\" & Sheets(1).Range("AK6").Text & ".wav", 0)
Call sndPlaySound32("c:\cdrombb\player\excel\theme\and.wav", 0)
Call sndPlaySound32("c:\cdrombb\player\excel\theme\" & Sheets(1).Range("AL6").Text & ".wav", 0)
End Sub
What do I need to do in order that the first line runs at the same time lines 2-7 are running sequentially?
Bookmarks