Results 1 to 1 of 1

Play WAV Simultaneously and Sequentially

Threaded View

  1. #1
    Registered User
    Join Date
    05-22-2011
    Location
    Midwestern U.S.
    MS-Off Ver
    Excel 2010
    Posts
    1

    Lightbulb Play WAV Simultaneously and Sequentially

    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?
    Last edited by tmiller2462; 05-22-2011 at 08:37 PM. Reason: Added notification

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1