Thanks to PhilR I found this code to make a flashing cell:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value = 55 Then
For n = 1 To 10
Target.Interior.Color = vbRed
Delay (0.04)
Target.Interior.ColorIndex = xlNone
Delay (0.04)
Next n
End If
End Sub
Sub Delay(rTime As Single)
'delay rTime seconds (min=.01, max=300)
Dim oldTime As Variant
'safety net
If rTime < 0.01 Or rTime > 300 Then rTime = 1
oldTime = Timer
Do
DoEvents
Loop Until Timer - oldTime > rTime
End Sub
It works great, but the cell that I want to have flashing contains an if Function: D12=IF(D11>200,"The Pressure is Too High!","") and somehow the flashing only takes place when I actually click on cell D12.
Any ideas about how to rectify this? The code works BEAUTIFULLY! I just want to work out this one small bug!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value = 55 Then
For n = 1 To 10
Target.Interior.Color = vbRed
Delay (0.04)
Target.Interior.ColorIndex = xlNone
Delay (0.04)
Next n
End If
End Sub
Sub Delay(rTime As Single)
'delay rTime seconds (min=.01, max=300)
Dim oldTime As Variant
'safety net
If rTime < 0.01 Or rTime > 300 Then rTime = 1
oldTime = Timer
Do
DoEvents
Loop Until Timer - oldTime > rTime
End Sub
It works great, but the cell that I want to have flashing contains an if Function: D12=IF(D11>200,"The Pressure is Too High!","") and somehow the flashing only takes place when I actually click on cell D12.
Any ideas about how to rectify this? The code works BEAUTIFULLY! I just want to work out this one small bug!