From: Rick Rothstein on
The Workbook_Open and the Workbook_BeforeClose procedures are workbook event
code and, as such, must be placed in the ThisWorkbook module, not the BAS
Module you now have them in (macros go in the BAS Module, but event code
goes in the sheet or workbook module that they apply to). You can open the
ThisWorkbook module by double clicking the ThisWorkbook entry from Project
window.

--
Rick (MVP - Excel)



"Suresh Lohar" <suresh.lohar(a)gmail.com> wrote in message
news:EE8B22D8-75AF-4F33-986E-6A22ECD69FF1(a)microsoft.com...
>
> Public RunWhen As Double
>
> Sub StartBlink()
> With ThisWorkbook.Worksheets("CALCULATION").Range("D4").Font
> If .ColorIndex = 3 Then ' Red Text
> .ColorIndex = 2 ' White Text
> Else
> .ColorIndex = 3 ' Red Text
> End If
> End With
> RunWhen = Now + TimeSerial(0, 0, 1)
> Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", ,
> True
> End Sub
>
> Sub StopBlink()
> ThisWorkbook.Worksheets("CALCULATION").Range("D4").Font.ColorIndex = _
> xlColorIndexAutomatic
> Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", ,
> False
> End Sub
> Private Sub Workbook_Open()
> StartBlink
> End Sub
>
> Private Sub Workbook_BeforeClose(Cancel As Boolean)
> StopBlink
> End Sub
>
>
> I used this macro, but text blink only then when I run the macros.
> When I open this file, Text doesn't blink automatically.
> Kindly help sir in this regard. Thanks a lot.

From: Suresh Lohar on
sir, many many thanks, it works now.

Thanks for quick and kind cooperation.

Suresh Lohar