Flashing Text

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,286
Office Version
  1. 2013
Platform
  1. Windows
Code:
<CODE itxtHarvested="1" itxtNodeId="15">Public NextFlash As Double
Public Const FR As String = "Sheet1!A1"
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</CODE>

Good Day,
The above code simply works with two button as start & stop.
Is it possible to alter it like if the cell values lesser than -100 within the ranges of ("B5:Y25") then flashing will be started?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Code:
<CODE itxtNodeId="15" itxtHarvested="1">Public NextFlash As Double
Public Const FR As String = "Sheet1!A1"
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</CODE>

Good Day,
The above code simply works with two button as start & stop.
Is it possible to alter it like if the cell values lesser than -100 within the ranges of ("B5:Y25") then flashing will be started?


Or how can we alter the below code as in same ranges ("B5:Y25") when the values are lesser then -100.000 ?
Many Thanks

Code:
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("A1") = "-100000" And CellCheck = False Then
        Call StartBlink
        CellCheck = True
    ElseIf Range("A1") <> "-100000" And CellCheck = True Then
        Call StopBlink
        CellCheck = False
    End If
 
End Sub
 
Option Explicit
Public RunWhen As Double
 
Sub StartBlink()
    If Range("A1").Interior.ColorIndex = 3 Then
        Range("A1").Interior.ColorIndex = 6
    Else
        Range("A1").Interior.ColorIndex = 3
    End If
    RunWhen = Now + TimeSerial(0, 0, 1)
    Application.OnTime RunWhen, "StartBlink", , True
End Sub
 
Sub StopBlink()
    Range("A1").Interior.ColorIndex = xlAutomatic
    Application.OnTime RunWhen, "StartBlink", , False
End Sub
 
Last edited:
Upvote 0
You going to give the users a way to turn off the flashing? I'd find it so annoying that I wouldn't use the workbook.
 
Upvote 0
You going to give the users a way to turn off the flashing? I'd find it so annoying that I wouldn't use the workbook.

i think it wouldn't be difficult to remove it just ignore that part.
The fact is how can we set the flashing in ranges ("B5:Y25") when the cell value is lesser -100.000?
 
Last edited:
Upvote 0
You've missed my point. Flashing text is insanely annoying, and you should not use it at all. Why can't you use unflashing conditional formatting? Change the font to bold italic magenta, with a bright yellow cell background, if the condition is not met. Very noticeable without inducing seizures or causing homicidal rage.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top