Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Excel Blinking TEXT

Hello

I found the following blinking text code via this forum.

------------------------------------------------
' First, you need to set up a procedure to cause the text to alternate
between white and black.
' Put the following code in a regular code module:
Private RunWhen As Double

Sub StartBlink()
If Range("Blink").Font.ColorIndex = 2 Then
Range("Blink").Font.ColorIndex = xlColorIndexAutomatic
Else
Range("Blink").Font.ColorIndex = 2
End If
RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True
End Sub

Sub StopBlink()
Range("Blink").Font.ColorIndex = xlColorIndexAutomatic
Application.OnTime RunWhen, "StartBlink", , False
End Sub

' In both these procedures, change the reference to A1 to the cell
that should blink.

' When the workbook is closed, you need to cancel OnTime event
triggers,
' so put the following code in the ThisWorkbook code module.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopBlink
End Sub


' You need to initiate this procedure when the workbook opens, so put
the following code
' in the ThisWorkbook code module:
Private Sub Workbook_Open()
StartBlink
End Sub
---------------------------------------------------------

Its working fine as long as no other excel file is not open. As soon
as I open anything else following error open.

"Run-time erroe '1004': Method 'Range' of object'_Global failed."


Could anyone please help as I want to use this code while other files
are open.

Thanks,

Naeem

Reply
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
How to get a blinking text in Excel 2007? Harry Excel Discussion (Misc queries) 1 November 15th 08 09:32 PM
how do I add flashing text or blinking text in Excel? Paula Brennan Excel Discussion (Misc queries) 1 October 31st 06 07:27 AM
CAN TEXT EFFECTS BE USED IN EXCEL E,G, BLINKING BACKGROUND CliveA Excel Discussion (Misc queries) 1 July 28th 06 04:33 PM
Can we insert blinking text in MS Excel ? Terranger Excel Discussion (Misc queries) 2 July 4th 06 05:00 PM
Blinking text in Excel ! RAFAAJ2000[_2_] Excel Programming 9 June 3rd 05 02:28 PM


All times are GMT +1. The time now is 04:08 AM.

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

About Us

"It's about Microsoft Excel"