Wierd One Here >>>>

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
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi Tom ??
Not too sure but apparently if you are in some sought of edit mode eg doubleclick
or formula edit / cell edit THEN IF the
Timer passes the Start value the function
call is RESET....not sure why ??
Will have a look further (time pemitting)

Just a side note: Sometimes you discover
different things when you least expect it.
Perhaps this could be used to your advantage
on something else ??
Just as an example Xl97 / Userform:- I found
that exercuting a call to displaying the Help
About ms excel caused the Userform to become
Non Modal !! so I didn't have to do any API
calls ......No one could explain it. I even
asked John Walkenback....

I'll keep this in mind...may come in handy.
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,271
Members
448,882
Latest member
Lorie1693

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top