I have found this code and modified it to my needs, however it is not working when the File is opened.
Cell J10 already has Clear Reports Folder, so when I open the file, I want J10 to flash without having to type anything.
Please, can anyone help me with this??
Thanks in advance for your help.
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("J10").Value = "Clear Reports Folder" Then
For n = 1 To 10
Range("J10").Font.Color = vbRed
Delay (0.25)
Range("J10").Font.Color = vbWhite
Delay (0.25)
Next n
ElseIf Range("J10").Value <> "Clear Reports Folder" Then
For n = 1 To 10
Range("C1").Font.Color = vbRed
Delay (0.25)
Range("C1").Font.Color = vbWhite
Delay (0.25)
Next n
End If
Range("J10,C1").Font.Color = vbBlack
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
Cell J10 already has Clear Reports Folder, so when I open the file, I want J10 to flash without having to type anything.
Please, can anyone help me with this??
Thanks in advance for your help.
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("J10").Value = "Clear Reports Folder" Then
For n = 1 To 10
Range("J10").Font.Color = vbRed
Delay (0.25)
Range("J10").Font.Color = vbWhite
Delay (0.25)
Next n
ElseIf Range("J10").Value <> "Clear Reports Folder" Then
For n = 1 To 10
Range("C1").Font.Color = vbRed
Delay (0.25)
Range("C1").Font.Color = vbWhite
Delay (0.25)
Next n
End If
Range("J10,C1").Font.Color = vbBlack
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