+ Reply to Thread
Results 1 to 4 of 4

Play a WAV sound file when macro is activated

  1. #1
    Registered User
    Join Date
    07-29-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    79

    Play a WAV sound file when macro is activated

    Hello All,

    As a short summary, I've requested help in a game buzzer style excel file to be used for a game activity and Davsth provided an excellent solution to the request. Again, Thank you Davsth for your assistance.

    I would like to ask how can I make it so that when either of the 2 macros were activated, a buzzer sound will play (to complete the effect of a working game buzzer system) I have a buzzer.wav file that I have on my local drive.

    Please see the attached file - The buzzer is composed mainly of 2 macros to activate Team A or Team B side, a reset button and a lock and unlock macro.

    Thank you so much!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Hi ! try this ‼


    Several ways, one as a demonstration starter :

    PHP Code: 
    Private Declare Function sndPlaySoundA Lib "winmm.dll" (ByVal fSon$, ByVal fuSound&) As Boolean

    Sub Demo1
    ()
        
    sndPlaySoundA "C:\Windows\Media\chimes.wav"2
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

  3. #3
    Registered User
    Join Date
    07-29-2016
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    79

    Re: Hi ! try this ‼

    Hi Marc L, sorry but my VBA knowledge is primitive at best, can I ask further clarification on how it will be placed? on the module?

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Play a WAV sound file when macro is activated


    To the top of the module …

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Play random sound file every x seconds, or when cursor is in particular cell
    By darkblueblood in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-15-2014, 12:47 AM
  2. Play sound file at set time each day
    By thetaplus in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-23-2008, 01:03 AM
  3. excel to play sound file
    By svanni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2006, 11:47 PM
  4. [SOLVED] Display Text and Play Sound file
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2006, 02:20 AM
  5. [SOLVED] Display Text and Play Sound file
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2006, 02:45 AM
  6. [SOLVED] Play Sound File
    By Soniya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-22-2006, 06:50 AM
  7. [SOLVED] Can you auto-trigger a sound file to play when a worksheet opens?
    By Nanotexan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-05-2006, 01:20 PM

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