Blinking Text

PRINCESS

Board Regular
Joined
Oct 28, 2002
Messages
73
Hello my geniuses,

Last night I went through several post with VBA code on how to make text blink. Some of the VBA's and instructions were a bit complex, but I found one that was pretty simple. The only problem is that once I change my
cell to show blank and than change it back to the blinking text parameter, it no longer run the VBA. I guess what I need is something that will restart the VBA everytime the cell changes, instead of just once. Oh ya one more thing, I want my text to be red/white, instead of black/white. Thanx guys!

This is what is in my cell:
=IF(AND($D$6<>"",$H$6<>""),IF($E$19="","UNABLE TO FIND CARRIER OR ROUTING - CHECK WITH SUPERVISOR",""),"")

And this is the VBA:

Option Explicit

Sub ChangeColor()

If Range("C8").Interior.ColorIndex = xlNone Then
Range("C8").Interior.ColorIndex = 1
Range("C8").Font.ColorIndex = 2
Else
Range("C8").Interior.ColorIndex = xlNone
Range("C8").Font.ColorIndex = 1
End If

If Range("C8").Text = "UNABLE TO FIND CARRIER OR ROUTING - CHECK WITH SUPERVISOR" Then
Application.OnTime Now + TimeSerial(0, 0, 1), "ChangeColor"
Else
Range("C8").Interior.ColorIndex = xlNone
Range("C8").Font.ColorIndex = 1
End If

End Sub
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Tushar,

Thanks for that tip.(y) You are quite right - a much more flexible approach.
<hr>Princess,

If you'd want to try this, you'd probably want to do two conditions for the conditional formatting on cell C8 -

Condition 1: (Red letters, white/blank background)
Formula is: =AND(LEFT(C8,6)="UNABLE",MOD(SECOND(NOW()),2))

Condition 2: (White Letters, Red Background)
Formula is: =AND(LEFT(C8,6)="UNABLE",NOT(MOD(SECOND(NOW()),2)))

You could put the call to RepeatOneSec() in the workbook's _Open() method.
 
Upvote 0

Forum statistics

Threads
1,215,193
Messages
6,123,560
Members
449,108
Latest member
rache47

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