Playing Sounds in Excel Using VBA – part #2

This section explains how to create a compound sound effect from elementary sounds. In the first example (two macros), the sound is played in a loop which is a native internal loop within the “PlaySound” function (using the flag option: SND_LOOP = &H8). A second function (the “Beep” function) creates a tone generator with adjustable frequency and play time. The Beep function is also used in a fourth macro, creating a sound which goes through a series of frequency steps between 100Hz and 6000Hz.

This article has 3 Comments

  1. Joe, I tried myself and I had problems on Macs. Sorry.

  2. I could not get the code to work on my Macintosh Pro OS 10.7.5 and EXCEL 14.7.3 (2011). Maybe the program listed is too new for my old Mac.

  3. Hello. I want to add sounds in my spreadsheet as the values changes, not with macros, since my spreadsheet has automatic update from a DDE link. Do you have any idea of how I can create it??? THank you very much in advance. Best regards,Caio

Leave a Reply

Your email address will not be published.