Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
speech with if formula
I want to assign audio file to a cell , to be triggered when the cell value
is grater than 15 for example |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
speech with if formula
http://support.microsoft.com/default...kb;en-us;86281
How To Play a Waveform (.WAV) Sound File in Visual Basic Choose your event (probably the Calculation event) http://www.cpearson.com/excel/events.htm Use a static variable or two to keep track of when to play and when you have played the sound. -- Regards, Tom Ogilvy "Mike" wrote in message ... I want to assign audio file to a cell , to be triggered when the cell value is grater than 15 for example |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
speech with if formula
Mike,
Depending on the version of Windows you're running the Excel file under, there may be different approaches. Either way, take a look at the reference to Chip Pearson's discussion on events given in Tom's post above. This example checks to see if cell C1 increased to 15 or greater after calculation and plays the referenced wav file if that is the case: _ _ _ _ _ _ _ _ _ _ Private Sub Worksheet_Calculate() Dim strWavPath As String If Range("$C$1").Value = 15 Then strWavPath = "C:\Program Files\Windows NT\Pinball\SOUND108.wav" x = Shell("sndrec32 /play /close " & Chr(34) & strWavPath & Chr(34), vbHide) End If End Sub _ _ _ _ _ _ _ _ _ _ If you know the OS will be WindowsXP you could use the sub below although the Windows text to speech lacks a bit in diction: _ _ _ _ _ _ _ _ _ _ Private Sub Worksheet_Calculate() Dim strNotify As String If Range("$C$1").Value = 15 Then strNotify = "The value of C 1 is " & CStr(Range("$C$1").Value) Set objVoice = CreateObject("SAPI.SpVoice") objVoice.Speak strNotify End If End Sub _ _ _ _ _ _ _ _ _ _ Steve Yandl "Mike" wrote in message ... I want to assign audio file to a cell , to be triggered when the cell value is grater than 15 for example |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
speech recognition | Excel Discussion (Misc queries) | |||
Speech Therapy | Excel Discussion (Misc queries) | |||
Text to speech | Excel Programming | |||
Getting Speech to work | Excel Worksheet Functions | |||
Application.Speech | Excel Programming |