Home |
Search |
Today's Posts |
#15
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rob,
Been there. As it happened Eser had spotted that himself and fixed it. The problem related to the declaration of the API, he omitted a space in the first argument, writing (ByVallpszName As String instead of (ByVal lpszName As String, and the only error he got was the 'dong' sound, which is confusing when you are trying to play sound(G. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... Oops - don't you hate it when that happens. Thanks Bob "Bob Phillips" wrote in message ... Zoom, Rob's code has a small but crucial error. It accepts a filename argument, but ignores it and tries to play a file called "C:\T\chimes.wav". If this doesn't exist it will play the ubiquitous dong. Replace it with this Public Function PlayWavFile(WavFile As String) As String Const SND_ASYNC = &H1 Const SND_FILENAME = &H20000 PlaySound WavFile, 0, SND_ASYNC Or SND_FILENAME PlayWavFile = "" End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create a sound alert in excel spreadsheet | Excel Discussion (Misc queries) | |||
sound alert from excel | Excel Discussion (Misc queries) | |||
Sound alert | Excel Discussion (Misc queries) | |||
Excel sound alert | Excel Programming | |||
How can I make a sound alert using macro in Excel! (But not use speaker) | Excel Programming |