ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   flashing cell in excel (https://www.excelbanter.com/excel-programming/375729-flashing-cell-excel.html)

Excel User

flashing cell in excel
 
Hi, I have the cell flashing but it is only visible when i drag the cells and
when the cells are covered with mouse draged cell shadow. Here are my
codings on macro please help to make it visible.

also when I password my sheet to be protected the effect of macro to flash
is shuts off. I have unlocked whole column and also deselected from range
that is being selected for protection

Public RunWhen As Double

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

also here is my coding for stop blinking
Sub StopBlink()
Range("bq6:bq89").Font.ColorIndex = xlColorIndexAutomatic
Application.OnTime RunWhen, "StartBlink", , False
End Sub

please help me this is an urgent need thank you, you can e-mail me at


NK



Tom Ogilvy

flashing cell in excel
 
looks like a logic error he

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

You set the color index to 3, then to change it back you don't do anything
unless it is set to 2. Doesn't make any sense. If you change it to 3, then
your if statement should check if it is 3.

--
Regards,
Tom Ogilvy


"EXCEL USER" wrote:

Hi, I have the cell flashing but it is only visible when i drag the cells and
when the cells are covered with mouse draged cell shadow. Here are my
codings on macro please help to make it visible.

also when I password my sheet to be protected the effect of macro to flash
is shuts off. I have unlocked whole column and also deselected from range
that is being selected for protection

Public RunWhen As Double

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

also here is my coding for stop blinking
Sub StopBlink()
Range("bq6:bq89").Font.ColorIndex = xlColorIndexAutomatic
Application.OnTime RunWhen, "StartBlink", , False
End Sub

please help me this is an urgent need thank you, you can e-mail me at


NK




All times are GMT +1. The time now is 11:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com