Krishnab4u
New Member
- Joined
- Jul 16, 2018
- Messages
- 34
Dear All,
I want a particular cell to blink until the value set to today's date.
following is the code used.
while the cell is blinking if i try to "Alt Tab" to see another workbook i get the error as "Run time error 9; Script out of range" and highlights line With Worksheets("Summary") in the above code (font bold and italised).
Please help.
I want a particular cell to blink until the value set to today's date.
following is the code used.
Code:
Option Explicit
Public RunWhen As Double
Sub StartBlink()
[U][I][B]With Worksheets("Summary")[/B][/I][/U]
.EnableOutlining = True
.Protect Password:="isuzu", _
Contents:=True, UserInterfaceOnly:=True
End With
If Worksheets("Summary").Range("X2:AA2").Interior.ColorIndex = 3 Then
Worksheets("Summary").Range("X2:AA2").Interior.ColorIndex = 4
Else
Worksheets("Summary").Range("X2:AA2").Interior.ColorIndex = 3
End If
RunWhen = Now + TimeSerial(0, 0, 2)
Application.OnTime RunWhen, "StartBlink", , True
End Sub
Sub StopBlink()
On Error Resume Next
Worksheets("Summary").Range("X2:AA2").Interior.ColorIndex = 30
Worksheets("Summary").Range("X2:AA2").Interior.Pattern = xlPatternLinearGradient
Application.OnTime RunWhen, "StartBlink", , False
End Sub
while the cell is blinking if i try to "Alt Tab" to see another workbook i get the error as "Run time error 9; Script out of range" and highlights line With Worksheets("Summary") in the above code (font bold and italised).
Please help.