FLASHING TEXT

Ian Dirnfeld

New Member
Joined
Oct 11, 2006
Messages
9
Is there any way to get a specific cell containing text to flash?
In Word, you can go to "Text Effects" and get the background of text to flash, immediately drawing your attention to it. I want to stop using Word for an app and start using Excel, but this function is critical to me. Any ideas?
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Ian Dirnfeld

New Member
Joined
Oct 11, 2006
Messages
9
tHANKS FOR THE QUICK REPLY!
i'LL TRY IT OUT; IF i HAVE ANY PROBLEMS, i'M SURE YOU'LL HEAR FROM ME AGAIN.
tHANKS!
iAN
 

Ian Dirnfeld

New Member
Joined
Oct 11, 2006
Messages
9
Hi Richard, me again-
I did it, but I think I am missing the lower portion of the StopFlash code, as it now stays in the steady blue I programmed for the Style Function I chose.
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707

ADVERTISEMENT

Ian

can you post the code you are using and state where you have placed it (presumably in a standard module). Thanks.

Richard
 

Ian Dirnfeld

New Member
Joined
Oct 11, 2006
Messages
9
Sure:

Dim NextTime As Date

Sub StartFlash()
NextTime = Now + TimeValue("00:00:01")
With ActiveWorkbook.Styles("Flashing").Font
If .ColorIndex = xlAutomatic Then .ColorIndex = 3
.ColorIndex = 5 - .ColorIndex
End With
Application.OnTime NextTime, "StartFlash"
End Sub

Sub StopFlash()
Application.OnTime NextTime, "StartFlash", schedule:=False
ActiveWorkbook.Styles("Flashing").Font.ColorIndex = xlAutomatic

Having new used a macro before, I just copied and pasted the first one, exited, then copied and asted the second one...I'm sure I did something wrong...
 

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Ian

You should have posted this into a standard module in your workbook - having done this (and created the style) it works for me. I must say it's pretty horrible to look at though.

Basically, in your module, the code should look like

Code:
Dim NextTime As Date

Sub StartFlash()
NextTime = Now + TimeValue("00:00:01")
With ActiveWorkbook.Styles("Flashing").Font
If .ColorIndex = xlAutomatic Then .ColorIndex = 3
.ColorIndex = 5 - .ColorIndex
End With
Application.OnTime NextTime, "StartFlash"
End Sub

Sub StopFlash()
Application.OnTime NextTime, "StartFlash", schedule:=False
ActiveWorkbook.Styles("Flashing").Font.ColorIndex = xlAutomatic
End Sub

Then activate via Tools>Macro>Macros and choose StartFlash from the list.
 

Watch MrExcel Video

Forum statistics

Threads
1,113,850
Messages
5,544,660
Members
410,628
Latest member
mike5
Top