Flashing Text

Jakeuk

New Member
Joined
Jan 1, 2003
Messages
8
Hi
is there a way of making the text in a cell flash or blink, the text within the cell is controlled by an IF condition, its a prompt to highlite the entry field for information.
Thanks
Jason
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Yes.

It would be much easier to help you with an example if you provide more details...

First, which cell or cells?
What is the condition which brings about the flashing?

What color will the text flash? As is?

Do you want the cell's interior to flash instead, as well, or not at all?

What condition or user action will stop the flashing?

Will any other VBA procedures need processor time to run at the same time as the procedure which flashes your text?

This question has been raised here before. Have you made a decent effort to search previous posts?

Thanks,
Anon
 
Upvote 0
This is the best I can do. It uses VB and is definately not ideal, but here you go:
Put this code into the code module for the sheet where you want to have flashing cells.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value = 55 Then
For n = 1 To 10
Target.Interior.Color = vbRed
Delay (0.04)
Target.Interior.ColorIndex = xlNone
Delay (0.04)
Next n
End If
End Sub

Sub Delay(rTime As Single)
'delay rTime seconds (min=.01, max=300)
Dim oldTime As Variant
'safety net
If rTime < 0.01 Or rTime > 300 Then rTime = 1
oldTime = Timer
Do
DoEvents
Loop Until Timer - oldTime > rTime
End Sub

This will make a cell flash red if you type 55 in it. Obviously, change the 55 to whatever you want. You can also play about with the delay values to slow it down or speed it up. If you want it to flash a different colour, change the vbRed to whatever (there is a list in the VBA help somewhere for valid colours). If you want it to only happen for one cell, then add this to the start of the code:

if target.row=3 and target.column=4 then

(don't forget to close this with an endif at the bottom)
this works for cell D3. For a different cell, change the row and column numbers.
Note: this will only flash when the value in the cell changes to 55. To make it flash again, you must change it to something else and then back to 55. Hope this helps - like I said it isn't ideal, but its the only way I can think of.

Phil
 
Upvote 0
Hi

Have a look at a post by rafaaj2000 dated 2002-12-27 (02-55)

Some useful VBA to try

Hope this helps get you started
 
Upvote 0
Cheers for your help, you guys.

you must have miss read the message ANON why do you need all the infomation you asked for just to make text flash?.

I didn't want an explanation of vba just to know if i could make the text flash.

sounds like some one who likes the sound of their keyboard.

Cheers evryone

J
 
Upvote 0
Can this code be changed:

Code:
Private Sub Worksheet_Change(ByVal Target As Range) 
If Target.Value = 55 Then 
For n = 1 To 10 
Target.Interior.Color = vbRed 
Delay (0.04) 
Target.Interior.ColorIndex = xlNone 
Delay (0.04) 
Next n 
End If 
End Sub 

Sub Delay(rTime As Single) 
'delay rTime seconds (min=.01, max=300) 
Dim oldTime As Variant 
'safety net 
If rTime < 0.01 Or rTime > 300 Then rTime = 1 
oldTime = Timer 
Do 
DoEvents 
Loop Until Timer - oldTime > rTime 
End Sub

So that if cell I54="Quarter End" then Cell F13 blinks? And if it doesn't = "Quarter End" then Cell B13 blinks? Also, can the blink last longer than a few seconds?

Thanks
 
Upvote 0
Here is building on Phils code..........


Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("I54").Value = "Quarter End" Then
For n = 1 To 10
Range("F13").Font.Color = vbRed
Delay (0.25)
Range("F13").Font.Color = vbWhite
Delay (0.25)
Next n
ElseIf Range("I54").Value <> "Quarter End" Then
For n = 1 To 10
Range("B13").Font.Color = vbRed
Delay (0.25)
Range("B13").Font.Color = vbWhite
Delay (0.25)
Next n
End If
Range("F13,B13").Font.Color = vbBlack
End Sub



Adjust the numeric value in the "Delay" line to control how long it blinks.

-Dave-
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,996
Members
448,935
Latest member
ijat

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