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