Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Blinking cell if value is...

Hi Chip,

How can I rewrite the code below so that startblink does not start at the
opening of the spreadsheet but rather starts as a result of cell A1 value =
"Already Posted" ?

And also I would like to be able to stop it at will, i.e., user acknowledges
it is in "already posted" status and clicks a button to stop it...

Please help.
Thanks,
Orlando


Complete VBA Code

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

Then, in the ThisWorkbook code module of the workbook, use code like:

Private Sub Workbook_Open()
StartBlink
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
StopBlink
End Sub


--
Orlando Vazquez


"Chip Pearson" wrote:

If you really want blinking text (which I find highly annoying) you
need to use a VBA function. Excel itself doesn't support blinking
text. See http://www.cpearson.com/Excel/BlinkingText.aspx for code
examples.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Wed, 17 Dec 2008 08:20:07 -0800, Melissa
wrote:

So this is probably something that should be very simple, but it's giving me
a headache.
I use excel at my job to keep track of stuff that needs to be picked up. The
value of this cell is manually inputted whenever it changes, Excel doesn't
calculate the value in any way. If there's 2, I input two. If it's 0, I put
in 0.
What I want it to do is blink if the value I input is greater than 0.
All the codes I've found only work if the cell value is being calculated by
Excel, or it effects more than just this particular cell.

The cell used is J1.
I want the color of the background to remain the same grey color, and if
it's 0 the text is a light grey, if it's 1 or greater the text blinks between
grey and bright red.

Can anyone help me?


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
blinking cell ktisqj Excel Discussion (Misc queries) 5 September 9th 09 07:04 AM
Blinking Cell Will Excel Discussion (Misc queries) 2 April 23rd 07 10:10 AM
Blinking cell PBANKS Excel Discussion (Misc queries) 4 June 30th 06 04:32 PM
Blinking Cell Jim Excel Programming 9 May 30th 06 11:38 PM
blinking cell? Martyn Excel Programming 13 June 13th 04 03:36 PM


All times are GMT +1. The time now is 10:48 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"