Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
then
If Application.CanPlaySounds Then
Call sndPlaySound32("pathname_of_wavfile_to_be_played", 0)
This works in a macro in excel it might work for you too
> Hi
>
[quoted text clipped - 4 lines]
>
> Owen
Owen - 29 Jul 2004 12:48 GMT
Sparkle
Thanks for the reply. I thought it may be simpler as I am not a great
programmer and the code you have sent doesn't make much sense.
Thanks
Owen
> Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
> (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
[quoted text clipped - 15 lines]
> >
> > Owen
sparkle_guy - 31 Jul 2004 16:27 GMT
Just cut and paste the two bits into your macro or vbscript. The all you
have to do is put the correct path to the sound file. NB The sound file
needs to be a .wav file
> Sparkle
>
[quoted text clipped - 24 lines]
> > >
> > > Owen
Owen - 03 Aug 2004 15:36 GMT
Hi Sparkle
Followed your advice and just get compiler errors.
Only comments can appear after end sub, end function or end property.
Thnak for your help
Owen
> Just cut and paste the two bits into your macro or vbscript. The all you
> have to do is put the correct path to the sound file. NB The sound file
[quoted text clipped - 28 lines]
> > > >
> > > > Owen