Blinking Cell

G

Guest

I make a warn in Excell with conditional fromat that if certain cell is text it goes red with a text, how can i make it blink to be better notest?
 
G

Gord Dibben

Micos

There are several routines posted at that URL. Some work when the cell
changes value, some are manually operated.

Which code did you use?

The "reading" part I really wanted you to see was the "DO NOT DO IT" part.

Blinking cells are offensive to the eye and consume resources and disrupt the
flow of worksheet manipulation.

Gord Dibben Excel MVP
 
N

Norman Harker

Hi Micos3!

I agree whole heartedly with Gord and you won't find many here who
disagree!

At least this approach only flashes if there's a change to the
offending cell.

It goes in the sheet module for the sheet with the cell where you want
to commit this crime against humanity. Copy the code below from this
post. Right click the sheet tab and select "View Code". The point to
the biggest window you see and Right Click > Paste. Close the VBE
editor.

To work, it relies on you naming the cell "MyFlashCell". Do this by
selecting the cell and entering the name MyFlashCell in the namebox
which is immediately to the left of the formula bar.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("MyFlashCell")) Is Nothing Then Exit Sub
Dim n As Integer
Dim NextTime As Date
If Range("MyFlashCell").Value > 7 Then
For n = 1 To 5
With Range("MyFlashCell").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
With Range("MyFlashCell").Interior
If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End If
With Range("MyFlashCell")
..Font.ColorIndex = 3
..Interior.ColorIndex = 2
End With
End Sub

But don't do it unless you are really into annoying people who use the
workbook.

And re: As this feature is requested quite often MS will probably
include this in a future Excel release ;-)

I hope that they add a couple of beeps to it and provide some fluffy
dice to hang in front of the VDU.

If anyone asks how you did it, please do not refer to me or Gord. We
weren't even participating in the Group today.
 
N

Norman Harker

Hi Micos3

Send a direct email to address below and I'll send you a workbook with
the code up and running.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top