Why does it sounds every minute?

  • Thread starter Thread starter J_J
  • Start date Start date
J

J_J

Hi,
The below code

'-------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
On Error Resume Next
For Each c In Range("D2:G5")
If Not Application.Intersect(Target, c.Precedents) Is Nothing Then
Interaction.Beep
End If
Next c
On Error GoTo 0
End Sub
'----------------------


sounds on each minute change of my system clock. You see, cells
A1 and B1 displays the system clock hour and minute values. And the watching
cells (Range D2:G5) look to the values displayed in A1 and
B1. Then the main macro is executed in minute intervals to let A1 and
B1 refresh their displays. Now although no "display" change is valid in the
watched cells the sound alarm beeps in minute intervals too. Maybe my other
suggestion may prevent that. I hope I didn't confuse you...
Hope we can solve this problem.
Regards
J_J
 
see response in .programming.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Sorry for my mistake...
The last sentences should have been:

Now although no "display" change is valid in the watched cells the sound
alarm beeps in minute intervals too.
Hope we can solve this problem.

p.s.: and apologies for posting to two different NG's the same Q.
It was not intended. I post by mistake.
Regards
J_J
 
Back
Top