Formatting Cell

  • Thread starter Thread starter davidiew
  • Start date Start date
D

davidiew

Greeting to all.

How should i format a cell so that it could have "Blinking Background"
like MsWord?

For an example, I used Condition Formatting on cell B2, when it mee
criteria, it change to "red colour background". Can it be blinking re
background?

Many thanks!

davidie
 
Hi davidiew!

Here's a solution I posted a week ago to a similar question:

This is one of those features that that we have not yet been blessed
with in any version of Excel.

But here is some code that is really nasty:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("MyFlashCell")) Is Nothing Then Exit Sub
Dim n As Integer
Dim NextTime As Date
If Range("MyFlashCell").Value > 7 Then
For n = 1 To 5
With Range("MyFlashCell").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
With Range("MyFlashCell").Interior
If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End If
With Range("MyFlashCell")
..Font.ColorIndex = 3
..Interior.ColorIndex = 2
End With
End Sub

It goes in the Sheet module, it sucks processing time and creates a
delay of 5 seconds on every recalculation if MyFlashCell exceeds the
value of 7.

Don't blame me if co-workers perform surgical operations on you
without anaesthetic.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi
This is possible only with code. But I strongly recommend not to
do this
- You can't do anything else while the cell blinks (as the macro runs
constantly)

Put the following in a module of your workbook


------
Dim Nexttime
Sub Flash()
NextTime = Now + TimeValue("00:00:01")
If ActiveWorkbook.Worksheets("Sheet1").Range("A1").value = 1 then
With ActiveWorkbook.Worksheets("Sheet1").Range("A1").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
end if
Application.OnTime NextTime, "Flash"
End Sub

Sub StopIt()
Application.OnTime NextTime, "Flash", schedule:=False
ActiveWorkbook.Worksheets("Tabelle3").Range("A1").Font.ColorIndex =
xlAutomatic
End Sub
 
Back
Top