• 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.

VBA or any formula to make defined cell blink.

Code:
Option Explicit

Public NextTime As Date

Sub FlashI30()
    NextTime = Now + TimeValue("00:00:01")
    With ActiveSheet.Range("D3")
        If .Value = "" Then
            With .Interior
                If .ColorIndex = xlNone Then .ColorIndex = 4 Else .ColorIndex = xlNone
            End With
            Application.OnTime NextTime, "FlashI30"
        Else
            .Interior.ColorIndex = xlNone
        End If
    End With
End Sub

Sub StopIt()
    Application.OnTime NextTime, "FlashI30", schedule:=False
    ActiveSheet.Range("I30").Interior.ColorIndex = xlNone
End Sub

Another version:

Code:
Option Explicit

Public NextFlash As Double
Public Const FlashRng As String = "Sheet1!A3"

Sub StartFlashing()
   If Range(FlashRng).Interior.ColorIndex = 3 Then
      Range(FlashRng).Interior.ColorIndex = xlColorIndexNone
   Else
      Range(FlashRng).Interior.ColorIndex = 3
   End If
   NextFlash = Now + TimeSerial(0, 0, 1)
   Application.OnTime NextFlash, "StartFlashing", , True
End Sub

Sub StopFlashing()
   Range(FlashRng).Interior.ColorIndex = xlColorIndexNone
   Application.OnTime NextFlash, "StartFlashing", , False
End Sub
 
I want to blink cell in col. J where cell contains text "check" & blink cell in col. S where cell value is >=0
what changes I have to make in current code.
 
Check your health and safety in the workplace regulations: blinking cells can induce epilepsy, and should therefore be avoided.
 
Back
Top