Forum Discussion
BBowen6501
Sep 26, 2022Copper Contributor
Auto on/off blink cells
Hi! I have been banging my head on my desk for several days now trying to make any of 3 cells blink in a worksheet when a specific criteria has been me. Brief synopsis: One worksheet (WS1) au...
mtarler
Sep 26, 2022Silver Contributor
I was thinking something like:
cells2blink=""
If Range("A23").Value = "PARTS" Then
cells2blink=cells2blink & "A23, "
end if
If Range("A31").Value = "PARTS" Then
cells2blink=cells2blink & "A31, "
end if
If Range("A39").Value = "PARTS" Then
cells2blink=cells2blink & "A39, "
end if
if LEN(cells2blink)>1 then
cells2blink=Left(cells2blink, LEN(cells2blink)-2)
Set CellToBlink = Range(cells2blink)
cont with blink...
cells2blink=""
If Range("A23").Value = "PARTS" Then
cells2blink=cells2blink & "A23, "
end if
If Range("A31").Value = "PARTS" Then
cells2blink=cells2blink & "A31, "
end if
If Range("A39").Value = "PARTS" Then
cells2blink=cells2blink & "A39, "
end if
if LEN(cells2blink)>1 then
cells2blink=Left(cells2blink, LEN(cells2blink)-2)
Set CellToBlink = Range(cells2blink)
cont with blink...
BBowen6501
Sep 27, 2022Copper Contributor
This is making cell A23 work, though.
Sub BlinkCell()
Dim CellToBlink As Range
If Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS" Then
Set CellToBlink = Range("A23")
Do While Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS"
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 0
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 3
Application.Wait (Now + TimeValue("00:00:01"))
DoEvents
Loop
If Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS" Then
Set CellToBlink = Range("A31")
Do While Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS"
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 0
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 3
Application.Wait (Now + TimeValue("00:00:01"))
DoEvents
Loop
If Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS" Then
Set CellToBlink = Range("A39")
Do While Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS"
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 0
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 3
Application.Wait (Now + TimeValue("00:00:01"))
DoEvents
Loop
End If
End If
End If
End Sub
Sub BlinkCell()
Dim CellToBlink As Range
If Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS" Then
Set CellToBlink = Range("A23")
Do While Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS"
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 0
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 3
Application.Wait (Now + TimeValue("00:00:01"))
DoEvents
Loop
If Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS" Then
Set CellToBlink = Range("A31")
Do While Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS"
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 0
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 3
Application.Wait (Now + TimeValue("00:00:01"))
DoEvents
Loop
If Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS" Then
Set CellToBlink = Range("A39")
Do While Range("A23").Value = "PARTS" Or Range("A31").Value = "PARTS" Or Range("A39").Value = "PARTS"
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 0
Application.Wait (Now + TimeValue("00:00:01"))
CellToBlink.Interior.ColorIndex = 3
Application.Wait (Now + TimeValue("00:00:01"))
DoEvents
Loop
End If
End If
End If
End Sub