Hello
I have found a code that I would like to alter to monitor cell $FP$1.
Cell $FP$1 formula is =IF(TEXT(FQ1,"ddd")=BF5,1,0)
Cell $FP$1 formula change reads 1 - result - should run StartFlashing
Cell $FP$1 formula change reads 0 - result - should runStopFlashing
Here is the existing code to be altered.
Option Explicit
Public NextFlash As Double
Public Const FR As String = "Sheet1!A1:C1"
Sub StartFlashing()
If Range(FR).Interior.ColorIndex = 3 Then
Range(FR).Interior.ColorIndex = xlColorIndexNone
Else
Range(FR).Interior.ColorIndex = 3
End If
NextFlash = Now + TimeSerial(0, 0, 1)
Application.OnTime NextFlash, "StartFlashing", , True
End Sub
Sub StopFlashing()
Range(FR).Interior.ColorIndex = xlColorIndexNone
Application.OnTime NextFlash, "StartFlashing", , False
End Sub
Private Sub Workbook_Close()
StopFlashing
End Sub
Private Sub Workbook_Open()
StartFlashing
End Sub
Many thanks
Peter
I have found a code that I would like to alter to monitor cell $FP$1.
Cell $FP$1 formula is =IF(TEXT(FQ1,"ddd")=BF5,1,0)
Cell $FP$1 formula change reads 1 - result - should run StartFlashing
Cell $FP$1 formula change reads 0 - result - should runStopFlashing
Here is the existing code to be altered.
Option Explicit
Public NextFlash As Double
Public Const FR As String = "Sheet1!A1:C1"
Sub StartFlashing()
If Range(FR).Interior.ColorIndex = 3 Then
Range(FR).Interior.ColorIndex = xlColorIndexNone
Else
Range(FR).Interior.ColorIndex = 3
End If
NextFlash = Now + TimeSerial(0, 0, 1)
Application.OnTime NextFlash, "StartFlashing", , True
End Sub
Sub StopFlashing()
Range(FR).Interior.ColorIndex = xlColorIndexNone
Application.OnTime NextFlash, "StartFlashing", , False
End Sub
Private Sub Workbook_Close()
StopFlashing
End Sub
Private Sub Workbook_Open()
StartFlashing
End Sub
Many thanks
Peter