Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use VBA to play a WAV file?
Hello all,
Can I use VBA to play a WAV file or some other sound file format? I do not want the playing of this sound to open up an external media player and be played inside of it, I want it to be a sound that just plays (like Windows and other programs events sounds). -- Thanks for any help anyone can provide, Conan Kelly |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use VBA to play a WAV file?
Hi Conan,
'------------------------ Can I use VBA to play a WAV file or some other sound file format? I do not want the playing of this sound to open up an external media player and be played inside of it, I want it to be a sound that just plays (like Windows and other programs events sounds). '------------------------ See John Walkenbach at: http://www.j-walk.com/ss/excel/tips/tip87.htm --- Regards, Norman |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I use VBA to play a WAV file?
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, _ hModule As Long, _ ByVal dwFlags As Long) As Long 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 call it like PlayWavFile ("C:\Windows\Media\Microsoft Office 2000\Chimes.wav") -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Conan Kelly" <CTBarbarin at msn dot com wrote in message ... Hello all, Can I use VBA to play a WAV file or some other sound file format? I do not want the playing of this sound to open up an external media player and be played inside of it, I want it to be a sound that just plays (like Windows and other programs events sounds). -- Thanks for any help anyone can provide, Conan Kelly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Play Sound File | Excel Programming | |||
Alarm, Play wav file | Excel Programming | |||
Play avi file in a Frame | Excel Programming | |||
How play a wav file | Excel Programming | |||
Macro to play wave file | Excel Programming |