function PlaySound does not work
- From: Susanne Wenzel <wirdnichtgelesen@xxxxxxxxxxxxx>
- Date: Fri, 22 Sep 2006 21:28:11 +0200
Hi to everyone,
I have no idea whether this group is the right one for my problem so I just
try (and maybe I'm lucky:-)
I'm getting nowhere in trying to play a .wav-file using the function
Playsound. There's no sound, no noise to be heard when I use this function
in vb(a), actually excel-vba, same thing happens in delphi. It does not
matter if I step through the code one by one or start it via GUI. If I try
via Single-Step-Mode (I hope I've translated it somewhere near the correct
one) at least he (i.e. my computer) takes a little time until he proceeds
to the next step. As if he was doing something... The return-code I'm
getting is 1, so he thinks he's successful.
Nowhere did I cross out anything in the sound volume. If I start the
..wav-file by doubleclick in the explorer, I can hear the sound loud and
clearly, no problem.
I have no idea where to look to solve this little but nevertheless annoying
problem. I know from several other users that they had no problems using my
little function: they could start the .wav-file via vba and heard it.:-)
But I can't.:-(
Does anyone here have an idea or just a link for me?
Any help would be appreciated.
This is the code I used... to no avail:-(
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA"
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Sub Klang()
Dim a
a = sndPlaySound32("C:\WINNT\Media\tada.wav", 0)
Debug.Print a
End Sub
Thanks for reading
Greetings from Germany
Susanne
--
Mein System:
Office XP, SP3, aktueller Patchstand
Windows 2000, SP4, aktueller Patchstand
.
- Follow-Ups:
- Re: function PlaySound does not work
- From: Thorsten Albers
- Re: function PlaySound does not work
- From: MikeD
- Re: function PlaySound does not work
- From: expvb
- Re: function PlaySound does not work
- Prev by Date: Re: NetShareAdd Error 123
- Next by Date: Re: restoring a minimzed application
- Previous by thread: Re: How to create a windows shortcut
- Next by thread: Re: function PlaySound does not work
- Index(es):
Relevant Pages
|