Is there a way I can use conditional formatting or something else to have a
sound (e.g., wav file) play if a value in cell A1 is less than 25? Note:
Cell A1 is an unattended update of a stock or bond value, so it changes
frequently, and I want to hear a sound if the value goes below 25.
Nick Hodge - 31 Dec 2004 07:27 GMT
Roy
Very dependent on hardware and setup, but this will sound 5 beeps (Or theme
noise if you have them set up) at 1 second intervals, when A1 goes below 25
(It will also sound on each change if the value stays below 25). It goes in
the code module behind the worksheet as it is event code.
(See here: http://www.nickhodge.co.uk/vba/vbaimplement.htm#EventCode)
Private Sub Worksheet_Change(ByVal Target As Range)
Dim x As Integer
If Not Intersect(Target, Range("A1")) Is Nothing Then
If Target.Value < 25 Then
For x = 1 To 5
Beep
Application.Wait Now + TimeValue("00:00:01")
Next x
End If
End If
End Sub

Signature
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS
> Is there a way I can use conditional formatting or something else to have
> a sound (e.g., wav file) play if a value in cell A1 is less than 25?
> Note: Cell A1 is an unattended update of a stock or bond value, so it
> changes frequently, and I want to hear a sound if the value goes below 25.
Frank Kabel - 31 Dec 2004 08:05 GMT
Hi
have a look at:
http://j-walk.com/ss/excel/tips/tip87.htm

Signature
Regards
Frank Kabel
Frankfurt, Germany
> Is there a way I can use conditional formatting or something else to have
> a sound (e.g., wav file) play if a value in cell A1 is less than 25?
> Note: Cell A1 is an unattended update of a stock or bond value, so it
> changes frequently, and I want to hear a sound if the value goes below 25.