LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel sound alert problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a sound alert in excel spreadsheet shaun t Excel Discussion (Misc queries) 8 November 23rd 08 12:09 AM
sound alert from excel dan Excel Discussion (Misc queries) 0 June 26th 06 03:49 AM
Sound alert Antonio Excel Discussion (Misc queries) 3 May 30th 06 07:09 PM
Excel sound alert Michelle Excel Programming 5 January 3rd 04 10:55 AM
How can I make a sound alert using macro in Excel! (But not use speaker) bookworm98 Excel Programming 5 December 11th 03 08:49 AM


All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"