• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to blink a cell's data?

Eloise T

Active Member
I found the code (see attachment) which changes the cell A1 font from red to green and back but is hanging on the last line:

Application.OnTime xTime, "'" & ThisWorkbook.Name & "'!StartBlink", , True

Any ideas what is wrong?

The entire subroutine:

Code:
Sub StartBlink()

  Dim xCell As Range

  Dim xTime As Variant

  Set xCell = Range("A1")

  With ThisWorkbook.Worksheets("Sheet1").Range("A1").Font

      If xCell.Font.Color = vbRed Then

          xCell.Font.Color = vbGreen

      Else

          xCell.Font.Color = vbRed

     End If

  End With

  xTime = Now + TimeSerial(0, 0, 1)

  Application.OnTime xTime, "'" & ThisWorkbook.Name & "'!StartBlink", , True

End Sub
 

Attachments

  • Chandoo - blink.xlsm
    15.7 KB · Views: 6
Last edited:
@ Eloise T, hi there!! I went through few of your posts and noticed that you are not comfortable with the "Like" button, I meant if anybody stretches a helping hand and in reality his effort helps you then it's a way of gratitude to like his post by pressing the like button. Thanks.
 
Back
Top