Results 1 to 4 of 4

Thread: Flashing Cells Or Text In Excel

  1. #1

    Default Flashing Cells Or Text In Excel

    I want to make a cell or text within within a range flash based on whether it matches a the value of another cell.

    Is there a set formula or VBA code that can help me do this?

  2. #2
    Board Regular jeffreybrown's Avatar
    Join Date
    Jul 2004

    Default Re: Flashing Cells Or Text In Excel

    You'll find most people on this site cringe at the thought of making a cell blink, but try a search on this site for flashing cells

    Last edited by jeffreybrown; Oct 14th, 2011 at 07:47 PM.

  3. #3
    New Member
    Join Date
    Apr 2011
    Kansas City, Mo

    Default Re: Flashing Cells Or Text In Excel

    Excel does not have any built in feature to make text blink, and many people, including me, consider this a blessing. Most developers frown strongly at the notion of blinking text, arguing (with merit) that it is highly distracting. However, enough people have asked about it that it is worthy of discussion. Personally, I would not like a workbook with blinking text, but I don't share the passion of others in their dislike of the idea.
    To make text blink,you need to execute a procedure periodically to change the font color of the text. The OnTime method can be used to run the procedure. You can use the code shown in the section below.

    Complete VBA Code:

    Public RunWhen As Double
    Sub StartBlink()
    With ThisWorkbook.Worksheets("Sheet1").Range("A1").Font
    If .ColorIndex = 3 Then ' Red Text
    .ColorIndex = 2 ' White Text
    .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("Sheet1").Range("A1").Font.ColorIndex = _ 
    Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", , False
    End Sub
    Then, in the ThisWorkbook code module of the workbook, use code like:

    Private Sub Workbook_Open()
    End Sub
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    End Sub

    Two important points to keep in mind:
    • Since the OnTime schedules a procedure every second, you'll encounter sluggish editing.
    • Blinking text may not be allowed in applications for governmental bodies, since it may be in violation of Section 508 of the Rehabilitation Act Of 1973 (since blinking text can cause seizures in epileptic patients).
    Last edited by Xtrimmer; Oct 14th, 2011 at 07:52 PM.

  4. #4

    Default Re: Flashing Cells Or Text In Excel


    You right about the flashing, it's annoying beyond belief, but the boss wants it, what can you do.



Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts