Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
At a certain event (push button) I would like to have
a sound (.wav) file being played. Any advise? (for a test, I reconfigured the "Default Beep" in Windows to the desired wav-ile. And then programm a simple "Beep" in VBA. But that (of course) gives me a lot of strange sounds at many other windows-events...) Hary |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You can find out how here http://www.j-walk.com/ss/excel/tips/tip59.htm Mike "Hartmut (Harry) Kloppert" wrote: At a certain event (push button) I would like to have a sound (.wav) file being played. Any advise? (for a test, I reconfigured the "Default Beep" in Windows to the desired wav-ile. And then programm a simple "Beep" in VBA. But that (of course) gives me a lot of strange sounds at many other windows-events...) Hary |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is one that will make a pinball machine sound if you enter a value
greater than 15 in cell C2. Just grab the inner portion of the If...Then block, put it in your sub for the button press and change to the wav file of your choice. '----------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$2" Then Application.EnableEvents = False If Target.Value = 15 Then strWavPath = "C:\Program Files\Windows NT\Pinball\SOUND36.wav" x = Shell("sndrec32 /play /close " & Chr(34) & strWavPath & Chr(34), vbHide) End If Application.EnableEvents = True End If End Sub '---------------------------------------- Steve Yandl "Hartmut (Harry) Kloppert" wrote in message ... At a certain event (push button) I would like to have a sound (.wav) file being played. Any advise? (for a test, I reconfigured the "Default Beep" in Windows to the desired wav-ile. And then programm a simple "Beep" in VBA. But that (of course) gives me a lot of strange sounds at many other windows-events...) Hary |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Steve. That was easy and effective!
Harry "Steve Yandl" wrote in message ... Here is one that will make a pinball machine sound if you enter a value greater than 15 in cell C2. Just grab the inner portion of the If...Then block, put it in your sub for the button press and change to the wav file of your choice. '----------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$C$2" Then Application.EnableEvents = False If Target.Value = 15 Then strWavPath = "C:\Program Files\Windows NT\Pinball\SOUND36.wav" x = Shell("sndrec32 /play /close " & Chr(34) & strWavPath & Chr(34), vbHide) End If Application.EnableEvents = True End If End Sub '---------------------------------------- Steve Yandl "Hartmut (Harry) Kloppert" wrote in message ... At a certain event (push button) I would like to have a sound (.wav) file being played. Any advise? (for a test, I reconfigured the "Default Beep" in Windows to the desired wav-ile. And then programm a simple "Beep" in VBA. But that (of course) gives me a lot of strange sounds at many other windows-events...) Hary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet_Change - initiate macro on another worksheet | Excel Programming | |||
How do I initiate a macro directly in a worksheet? | Excel Programming | |||
Initiate Macro On Save | Excel Programming | |||
Macro to initiate a spreadsheet to email | Excel Programming | |||
DDE Initiate does not work | Excel Programming |