|
It's probably trying to open up with a media
player that you don't have on your machine. Here's some code I used in VB
to play a wav file.
Global Const SND_SYNC =
&H0
' Play synchronously
Global Const SND_NODEFAULT = &H2 ' Silence not default, if sound not found Global Const SND_ASYNC = &H1 ' Play async Public Declare Function PlaySound Lib
"winmm.dll" Alias "PlaySoundA" (ByVal lpszSoundName As String, ByVal hModule As
Long, ByVal uFlags As Long) As Long
Dim X as long
X
= PlaySound(App.Path & "\zarathustra.WAV", 0, SND_ASYNC Or
SND_NODEFAULT)
I hope this helps.
Martin E. Reiter -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of White, Scott A Sent: Friday, January 21, 2005 8:54 AM To: [email protected] Subject: [Talk] Launching sound file Hello
everyone,
I have
a procedure that I want to call if a certain condition
exists.
Basically, I want an audible sound to draw my attention to my
p.c..
Sub SoundAlert() Shell "C:\WINNT\Media\Microsoft Office 2000\CHIMES.WAV" End Sub I get
- "Invalid procedure call or argument".
Can
anyone tell me why it doesn't work?
Thank
you,
Scott
"Important Warning: This message is intended for the use of the person or entity to whom it is addressed and may contain information that is privileged and confidential. This disclosure is governed by applicable law. If you are not the intended recipient, employer, or agent responsible for delivery to the intended recipient, you are hereby notified that any disclosure, copying, or distribution of this information is strictly prohibited." |
- [Talk] Launching sound file White, Scott A
- RE: [Talk] Launching sound file Rich McNeil
- RE: [Talk] Launching sound file Reiter, Martin E
- RE: [Talk] Launching sound file David Shelby
