HI all,
I'm trying to make a cell blink based on the color of another cell.
BTW this is a deadline monitoring tool. cant seem to make it work.
here is my code below.
-----------------------------------------------------------------------------------------------
Option Explicit
Public CellCheck As Boolean
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Change the IF statement and cell range to what you need
If Range("u8").Interior.ColorIndex = "3" Then
Call StartBlink
CellCheck = True
ElseIf Range("u8").Interior.ColorIndex <> "3" Then
Call StopBlink
CellCheck = False
End If
End Sub
-------------------------------------------------------------------------------------------------
Option Explicit
Public RunWhen As Double
Sub StartBlink()
If Range("g8").Interior.ColorIndex = 3 Then
Range("g8").Interior.ColorIndex = 6
Else
Range("g8").Interior.ColorIndex = 3
End If
RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True
End Sub
Sub StopBlink()
Range("g8").Interior.ColorIndex = 0
Application.OnTime RunWhen, "StartBlink", , False
End Sub
------------------------------------------------------------------------------------
I'm trying to make a cell blink based on the color of another cell.
BTW this is a deadline monitoring tool. cant seem to make it work.
here is my code below.
-----------------------------------------------------------------------------------------------
Option Explicit
Public CellCheck As Boolean
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Change the IF statement and cell range to what you need
If Range("u8").Interior.ColorIndex = "3" Then
Call StartBlink
CellCheck = True
ElseIf Range("u8").Interior.ColorIndex <> "3" Then
Call StopBlink
CellCheck = False
End If
End Sub
-------------------------------------------------------------------------------------------------
Option Explicit
Public RunWhen As Double
Sub StartBlink()
If Range("g8").Interior.ColorIndex = 3 Then
Range("g8").Interior.ColorIndex = 6
Else
Range("g8").Interior.ColorIndex = 3
End If
RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True
End Sub
Sub StopBlink()
Range("g8").Interior.ColorIndex = 0
Application.OnTime RunWhen, "StartBlink", , False
End Sub
------------------------------------------------------------------------------------