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?
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

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.
 

Forum statistics

Threads
1,140,944
Messages
5,703,312
Members
421,290
Latest member
james90

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
Top