Thread: blinking number
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
KL KL is offline
external usenet poster
 
Posts: 201
Default blinking number

"Rev Keith" wrote:
I forgot how to make a total flash/blink if its greater than zero. A few
tips
would help.


"Mike H" wrote
However if you must, look he-
http://www.cpearson.com/excel/BlinkingText.htm


Hi Guys,

If you want to preserve the Undo/Redo functionality, you may want to try
this:

1) Create a named formula called TIMER
=MOD(SECOND(NOW()),2)=1

2) Select the range you want to blink subject to a condition (or multiple
conditions), say range A1:A100

3) Apply the following Conditional Format
=TIMER*(A1<0)

where (A1<0) is one of the many possible conditions.

4) put the following code into the VBA module of ThisWorkbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopBlinking
End Sub

Private Sub Workbook_Open()
StartBlinking
End Sub

5) put the following code into a standard module (say Module1):

Dim dtNext As Date

Sub StartBlinking()
dtNext = Now + TimeValue("00:00:01")
Application.Calculate 'or Application.ScreenUpdating=True
Application.OnTime dtNext, "StartBlinking"
End Sub

Sub StopBlinking()
Application.OnTime dtNext, "StartBlinking", schedule:=False
End Sub

--
KL
[MVP - Microsoft Excel]
RU: http://www.mvps.ru/Program/Default.aspx
ES: http://mvp.support.microsoft.com/?LN=es-es
EN: http://mvp.support.microsoft.com/?LN=en-us
Profile: http://mvp.support.microsoft.com/profile/Kirill