LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Blinking cells

I have a workbook with 3 sheets and sheet 1 has cell A1 as a blinking cell (
code below). Now I want also sheet 2 and sheet 3 with a blinking cell ( cell
A2 in both sheets).
This is the code:

In Workbook
Private Sub Workbook_Open()
StartBlink
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopBlink
End Sub

In Module:
Public RunWhen As Double

Sub StartBlink()
With ThisWorkbook.Worksheets("Sheet1").Range("A1").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("Sheet1").Range("A1").Font .ColorIndex = _
xlColorIndexAutomatic
Application.OnTime RunWhen, "'" & ThisWorkbook.Name & "'!StartBlink", ,
False
End Sub

Any help please?
Thank you.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blinking text somaloft Excel Worksheet Functions 1 May 3rd 08 03:01 PM
Blinking Text Esra Dekan Excel Worksheet Functions 43 February 19th 08 12:42 AM
Blinking/Flashing Cells maacmaac Excel Discussion (Misc queries) 2 December 7th 05 03:46 PM
Blinking Text Gordon C Excel Programming 1 December 7th 03 06:16 PM
Blinking Text? Wazza McG[_2_] Excel Programming 1 December 6th 03 09:59 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"