flashing cells for just a few seconds.

  • Thread starter Thread starter solo_razor
  • Start date Start date
S

solo_razor

Hi,

Does anybody know how i can change the color in a cel to e.g.
green, yellow, purple, blue, white and circulate that for a few seconds
and that after let's say 3 seconds the cel or cells get 1 color. Sort
of a flashing cel.

Thx
 
Try this, it may not be the good code or fastest code but seems work

Sub FlashColor()
Dim PauseTime, Start
Dim myColour As Integer
PauseTime = 0.05263
myColour = 0
Do Until myColour = 57
Start = Timer
Do While Timer < Start + PauseTime
With Selection.Interior
.ColorIndex = myColour
End With
Loop
myColour = myColour + 1
Loop
Selection.Interior.ColorIndex = 0
End Sub
 
solo_razor said:
Hi,

Does anybody know how i can change the color in a cel to e.g.
green, yellow, purple, blue, white and circulate that for a few seconds
and that after let's say 3 seconds the cel or cells get 1 color. Sort
of a flashing cel.

Thx

Change this to suit:

Sub circ()

For i = 1 To 5
Range("a1").Interior.ColorIndex = 6
Call pauseit
Range("a1").Interior.ColorIndex = 7
Call pauseit
Range("a1").Interior.ColorIndex = 8
Call pauseit
Next

Range("a1").Interior.ColorIndex = 8

End Sub

Sub pauseit()

For i = 1 To 200000
Next

End Sub
 
Back
Top