L
Legacy 98055
Guest
Hi.
Writing a procedure to cause a cell to blink if certain conditions are not met...
However, a double-click in any cell causes the procedure to stop???
See:
http://www.mrexcel.com/board/viewtopic.php?topic=6567&forum=2&5
Code Here:
<pre>
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value < 10 Then
BlinkBlink Sheet1.Range("A1")
End If
End If
End Sub
Sub BlinkBlink(BlinkingRange As Range)
Dim Start
Do Until BlinkingRange.Value >= 10
Start = Timer
Do While Timer < Start + 1
If Timer = 0 Then Start = Timer
DoEvents
Loop
If BlinkingRange.Interior.ColorIndex = 3 Then
BlinkingRange.Interior.ColorIndex = 0
Else: BlinkingRange.Interior.ColorIndex = 3
End If
Loop
End Sub
</pre>
Thanks,
Tom
Writing a procedure to cause a cell to blink if certain conditions are not met...
However, a double-click in any cell causes the procedure to stop???
See:
http://www.mrexcel.com/board/viewtopic.php?topic=6567&forum=2&5
Code Here:
<pre>
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value < 10 Then
BlinkBlink Sheet1.Range("A1")
End If
End If
End Sub
Sub BlinkBlink(BlinkingRange As Range)
Dim Start
Do Until BlinkingRange.Value >= 10
Start = Timer
Do While Timer < Start + 1
If Timer = 0 Then Start = Timer
DoEvents
Loop
If BlinkingRange.Interior.ColorIndex = 3 Then
BlinkingRange.Interior.ColorIndex = 0
Else: BlinkingRange.Interior.ColorIndex = 3
End If
Loop
End Sub
</pre>
Thanks,
Tom