Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: Made In The USA

OH KING OF EXCEL — How to create a cell with a flashing color background?


11 posted on 04/18/2013 7:36:24 AM PDT by martin_fierro (< |:)~)
[ Post Reply | Private Reply | To 3 | View Replies ]


To: martin_fierro

Cell Background Flash:
Code#1:

Sub FlashBack()
‘Make cell range Background color, flash x times, x fast, in x color,
‘when Ctrl-a is pressed, you must set this macro option.

Dim newColor As Integer
Dim myCell As Range
Dim x As Integer
Dim fSpeed

‘Make this cell range background flash!
Set myCell = Range(”A1:A2”)
Application.DisplayStatusBar = True
Application.StatusBar = “... Select Cell to Stop and Edit or Wait for Flashing to Stop! “

‘Make cell background flash to this color!
‘Black 25, Magenta 26, Yellow 27, Cyan 28, Violet 29, Dark Red 30,
‘Teal 31, Blue 32, White 2, Red 3, Light Blue 41, Dark Blue 11,
‘Gray-50% 16, Gray-25% 15, Bright Cyan 8.
newColor = 27

‘Make the cell range flash fast: 0.01 to slow: 0.99
fSpeed = 0.2

‘Make cell flash, this many times!
Do Until x = 35

‘Run loop!
DoEvents
Start = Timer
Delay = Start + fSpeed
Do Until Timer > Delay
DoEvents
myCell.Interior.ColorIndex = newColor
Loop
Start = Timer
Delay = Start + fSpeed
Do Until Timer > Delay
DoEvents
myCell.Interior.ColorIndex = xlNone
Loop
x = x + 1
Loop
Application.StatusBar = False
Application.DisplayStatusBar = Application.DisplayStatusBar
End Sub

Cell Font Flash:
Code#2:

Sub FlashFont()
‘Make cell range font flash, x times, x fast, in x color,
‘when Ctrl-z is pressed.
Dim newColor As Integer
Dim myCell As Range
Dim x As Integer
Dim fSpeed

‘Make this cell range font flash!
Set myCell = Range(”A1:A2”)
Application.DisplayStatusBar = True
Application.StatusBar = “... Select Cell to Stop and Edit or Wait for Flashing to Stop! “

‘Make cell font flash to this color!
‘Black 25, Magenta 26, Yellow 27, Cyan 28, Violet 29, Dark Red 30,
‘Teal 31, Blue 32, White 2, Red 3, Light Blue 41, Dark Blue 11,
‘Gray-50% 16, Gray-25% 15, Bright Cyan 8.

newColor = 3

‘Make the cell range flash fast: 0.01 to slow: 0.99
fSpeed = 0.3

‘Make cell flash, this many times!
Do Until x = 20

‘Run loop!
DoEvents
Start = Timer
Delay = Start + fSpeed
Do Until Timer > Delay
DoEvents
myCell.Font.ColorIndex = newColor
Loop
Start = Timer
Delay = Start + fSpeed
Do Until Timer > Delay
DoEvents
myCell.Font.ColorIndex = xlAutomatic
Loop
x = x + 1
Loop
Application.StatusBar = False
Application.DisplayStatusBar = Application.DisplayStatusBar
End Sub
Sub reSetFlash()
‘Re-set cell range color if edit break on color, Ctrl-r to re-set!
ActiveCell.Select
Selection.Interior.ColorIndex = xlNone
End Sub

Source:

http://www.mrexcel.com/forum/excel-questions/32791-flashing-cells.html


17 posted on 04/18/2013 7:55:02 AM PDT by carriage_hill (The most insidious power the news media has, is the power to ignore.)
[ Post Reply | Private Reply | To 11 | View Replies ]

To: martin_fierro

PS - I use MS-Works v9.0, so I can’t vouch for those formulas.


18 posted on 04/18/2013 7:56:44 AM PDT by carriage_hill (The most insidious power the news media has, is the power to ignore.)
[ Post Reply | Private Reply | To 11 | View Replies ]

To: martin_fierro

“How to create a cell with a flashing color background?”

EASY! You losely plug in the monitor, or blink a real lot. Have a similar suggestion to have the whole spreadsheet slowly fade to dark.

Haven’t had to do a flashing cell yet, so I stole this off the web: http://excel.tips.net/T002134_Flashing_Cells.html

Good luck!


35 posted on 04/18/2013 10:09:08 AM PDT by Made In The USA (I'm not yelling, just... just talking enthusiastically..)
[ Post Reply | Private Reply | To 11 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson