Is it possible to make a cell flash between 2 colours?

G

Gary''s Student

You might try an OnTime Event procedure to alternately change a cell's
background color back and forth. But it would not blink very fast.

See http://cpearson.com/excel/ontime.htm for help on OnTime.

_____________________________________
Gary's Student
 
D

Desert Piranha

barry24uk said:
I think the question speaks for itself.
Hi Barry,
Try this, cange to suit your needs
'----------
Public Sub Blink()
Dim appTime
With Sheets(1).Range("A1").Interior
If .ColorIndex = 4 Then
.ColorIndex = 3
Else
.ColorIndex = 4
End If
End With
appTime = Now() + TimeValue("00:00:01")
Application.OnTime appTime, "Blink"
End Sub
'---------
 
I

ikr

"Desert Piranha"
Hi Barry,
Try this, cange to suit your needs
'----------
Public Sub Blink()
Dim appTime
With Sheets(1).Range("A1").Interior
If .ColorIndex = 4 Then
ColorIndex = 3
Else
ColorIndex = 4
End If
End With
appTime = Now() + TimeValue("00:00:01")
Application.OnTime appTime, "Blink"
End Sub
'----------

dot missing from the beginning of the ColorIndex = 3 and ColorIndex = 4
lines, to link with the With statement, viz:
..ColorIndex = 3
....
..ColorIndex = 4
 
D

Desert Piranha

ikr said:
"Desert Piranha"
messag


dot missing from the beginning of the ColorIndex = 3 and ColorIndex
4
lines, to link with the With statement, viz:
..ColorIndex = 3
....
..ColorIndex = 4Hi ikr,
Don't know, but in my post there are dots in front of them.
Maybe whatever you are using to view with, is not picking them up.
I should have put tags around the code
 
I

ikr

"Desert Piranha"
Don't know, but in my post there are dots in front of them.
Maybe whatever you are using to view with, is not picking them up.
I should have put tags around the code.
I'm using Outlook Express
 
B

barry24uk

Sorry. I should have told you that the cell I want to flash between the 2
colours already contains an IF formula
=IF(S28<=0," ",IF(N28>=P9," ",IF(N28<P9,"Replace Your Clone")))
There is also a Conditional format linked to the cell as well.
 
Top