Dear Jake,
The watched cells are
D2, D3, E2, E3, F2, F3, F4, F5, F6, G2, G3, and G4.
These cells change their display according to the values read from A1 and B1
which displays the hour and time of system clock.
Normally thouse watched cells all display a "_" character if the conditions
in their formulas does not force them to change their display.
Can we modify your macro so that if any one of thouse cells changes its
displayed value then the sound beeps?.
J_J
"Jake Marx" wrote in message
...
Hi J_J,
You should be able to do this with the Change event of the Worksheet
object. Copy the following code into the worksheet's code module
(right-click your sheet tab and select View Code):
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
For Each c In Range("A6:D6")
If Not Application.Intersect(Target, _
c.Precedents) Is Nothing Then
Interaction.Beep
End If
Next c
End Sub
Just change the A6:D6 to the range containing the 10-15 cells that contain
the formulas you want to watch.
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
J_J wrote:
Hi,
My question is on the subject line...
I have a worksheet which has 10-15 cells with long IF statements as
formulas.
The cell formulas are in the form of (not exactly of course):
=IF(A1=condition1 OR B1=condition2, display"first message", else
if(A1=condition2 AND B1=condition3), display"second message", else
display "third message")
etc.
I need to use my laptops internal speaker to sound an alarm (bip) or
call a *.wav file to play.... "if" any one of the cell value is
"changed" because of the conditions on any one of the cell is changed
.
Can this be done via VBA?. I'd appreciate if code samples can be
given.
TIA
J_J