Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel sound 1

Status
Not open for further replies.

RobBroekhuis

Technical User
Oct 15, 2001
1,971
US
What's the cleanest way to play sounds from Excel VBA? What I've done so far is insert an object from file, browsed for the .wav, then formatted the object to 100% brightness (white) and no line border, and made it small enough to fit inside cell borders, so it's invisible. I named it "Chime", and put the following code in my VBA macro:

ActiveSheet.Shapes("Chime").Select
Selection.Verb

It works, but I can't help but feel there should be a less circuitous way to do this.
Rob
[flowerface]
 
Thanks Nikki,
The dll call was really all I needed. I still don't think I can actually implement it, because I don't want to distribute a .wav file with the workbook, and this approach requires a file external to the workbook. But I'm definitely keeping the dll reference in my personal.xls!
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top