PDA

View Full Version : [SLEEPER:] BLINKING CELL IN EXCEL



EmyvilleRL
11-07-2011, 04:56 PM
Please help me. I wanted a cell in my Excel Worksheet to be blinking, I have entered a code and the cell in question started blinking, but when I close and exit Excel and launch the file again the blinking cell does not start blinking.

How can I make the worksheet to work with the blinking cell immediate the file is open.

I will appreciate your earliest responses and guides.

:help

mdmackillop
11-07-2011, 05:30 PM
Call your Blinking code like this. The Code should be placed in ThisWorkbook module


Private Sub Workbook_Open()
Call StartBlinking
End Sub

EmyvilleRL
11-07-2011, 05:54 PM
Below is the script I placed on the module,

Option Explicit

Public RunWhen As Double

Sub StartBlink()
If Range("A1").Interior.ColorIndex = 3 Then
Range("A1").Interior.ColorIndex = 6
Else
Range("A1").Interior.ColorIndex = 3
End If
RunWhen = Now + TimeSerial(0, 0, 1) Application.OnTime RunWhen, "StartBlink", , True
End Sub

Sub StopBlink()
Range("A1").Interior.ColorIndex = xlAutomatic
Application.OnTime
RunWhen, "StartBlink", , False
End Sub

BUT WHEN YOU SAVE AND EXIT THE WORKBOOK AND OPEN THE FILE/WORKBOOK AGAIN THE BLINKING CELL WILL NOT RUN

WHAT CAN I DO TO MAKE IT BLINK EACH TIME THE WORKBOOK IS OPENED?

:help

mdmackillop
11-08-2011, 02:44 AM
As post 2