Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to play a wav file, when a user does a
specific action? I've seen some code in the forum, but i could not get it to work. Thanks, Scott |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Scott,
Here is some code to do it 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 ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Scott" wrote in message ... Is there a way to play a wav file, when a user does a specific action? I've seen some code in the forum, but i could not get it to work. Thanks, Scott |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
Thanks for the help. Works great!!! -----Original Message----- Hi Scott, Here is some code to do it 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 ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Scott" wrote in message ... Is there a way to play a wav file, when a user does a specific action? I've seen some code in the forum, but i could not get it to work. Thanks, Scott . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Play Sound File Once when cell value condition id met | Excel Discussion (Misc queries) | |||
How can I play a .WAV file in Excel if a condition is met? | Excel Worksheet Functions | |||
How can i play a wave file in excel? | Excel Discussion (Misc queries) | |||
Macro to Play Wave File | Excel Programming | |||
Macro to play wave file | Excel Programming |