can you make a cell blink?

P

pat67

I am look to emphasize a result by blinking the cell. Just wondering
if it's possible. And if so, how. Thanks
 
P

pat67

You really do NOT want to do that.

A lot of people say that but I am unsure why. I have code that is
doing it now but I have a question. The blinking cell is the value of
inventory. What I want to do is when we are projected to be under the
goal just make the cell text green but when we project to be over,
have it be red and blink t emphasize. below makes it blink red every
second. I tried just using conditional formatting of the cell but I
guess that overrides the code because it just turned green and
stopped. My assumption is I will have to use code to do it. Problem is
i am unsure how. So my question then would be how would i do that?
Thanks



Public RunWhen As Double

Sub StartBlink()
With ThisWorkbook.Worksheets("Current_Summary").Range("C3").Font
If .ColorIndex = 3 Then ' Red Text
.ColorIndex = 2 ' White Text
Else
.ColorIndex = 3 ' Red Text
End If
End With
RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!
StartBlink", , True
End Sub

Sub StopBlink()

ThisWorkbook.Worksheets("Current_Summary").Range("C3").Font.ColorIndex
= _
xlColorIndexAutomatic
Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!
StartBlink", , False
End Sub
 
J

James Ravenswood

A lot of people say that but I am unsure why. I have code that is
doing it now but I have a question. The blinking cell is the value of
inventory. What I want to do is when we are projected to be under the
goal just make the cell text green but when we project to be over,
have it be red and blink t emphasize. below makes it blink red every
second. I tried just using conditional formatting of the cell but I
guess that overrides the code because it just turned green and
stopped. My assumption is I will have to use code to do it. Problem is
i am unsure how. So my question then would be how would i do that?
Thanks

Public RunWhen As Double

Sub StartBlink()
    With ThisWorkbook.Worksheets("Current_Summary").Range("C3").Font
        If .ColorIndex = 3 Then ' Red Text
            .ColorIndex = 2 ' White Text
        Else
            .ColorIndex = 3 ' Red Text
        End If
    End With
    RunWhen = Now + TimeSerial(0, 0, 1)
    Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!
StartBlink", , True
End Sub

Sub StopBlink()

ThisWorkbook.Worksheets("Current_Summary").Range("C3").Font.ColorIndex
= _
        xlColorIndexAutomatic
    Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!
StartBlink", , False
End Sub

See:

http://www.cpearson.com/excel/BlinkingText.aspx
 

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