ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Blinking Cell (Worksheet restarts) (https://www.excelbanter.com/excel-programming/333046-re-blinking-cell-worksheet-restarts.html)

bhawane

Blinking Cell (Worksheet restarts)
 

ok got the solution for you.

Module1

Sub Blink(MyStart, MyFinish)
Dim c As Range
For Each c In Range("C3").Cells
If c.Interior.ColorIndex = 47 Then
If c.Value 100 Then
c.Interior.ColorIndex = 2 'White
ElseIf c.Value 50 Then
c.Interior.ColorIndex = 2 'White
Else
c.Interior.ColorIndex = 2 'White
End If
Else
c.Interior.ColorIndex = 47
End If

Next c
Application.OnTime MyStart, "Blink", MyFinish
End Sub

.................................................. .............

ThisWorkbook

Private Sub Workbook_BeforeClose(Cancel As Boolean)
MyStart = BlinkTime = Now()
MyFinish = BlinkTime = Now()
Call Blink(MyStart, MyFinish)
End Sub

Private Sub Workbook_Open()
MyStart = BlinkTime = Now() + TimeValue("00:00:01")
MyFinish = BlinkTime = Now() + TimeValue("23:00:00")
Call Blink(MyStart, MyFinish)
End Su

--
bhawanePosted from http://www.pcreview.co.uk/ newsgroup acces



All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com