PC Review


Reply
Thread Tools Rate Thread

Blinking cell if value is...

 
 
Melissa
Guest
Posts: n/a
 
      17th Dec 2008
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 With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      17th Dec 2008
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
<(E-Mail Removed)> 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 With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      17th Dec 2008
My suggestion is to not use blinking text... it is very annoying to look at.
However, if you must, look here...

http://www.cpearson.com/Excel/BlinkingText.aspx

--
Rick (MVP - Excel)


"Chip Pearson" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> <(E-Mail Removed)> 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 With Quote
 
Melissa
Guest
Posts: n/a
 
      17th Dec 2008
Thanks.
I'm sure it is annoying if you're staring at it constantly, but this
spreadsheet is displayed on a tv screen as a status board for workers to look
at occassionaly and know what needs to be done. Obviously something blinking
is going to grab their attention and not be overlooked.

"Rick Rothstein" wrote:

> My suggestion is to not use blinking text... it is very annoying to look at.
> However, if you must, look here...
>
> http://www.cpearson.com/Excel/BlinkingText.aspx
>
> --
> Rick (MVP - Excel)
>
>
> "Chip Pearson" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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
> > <(E-Mail Removed)> 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 With Quote
 
ORLANDO VAZQUEZ
Guest
Posts: n/a
 
      2nd Apr 2009
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
> <(E-Mail Removed)> 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 With Quote
 
Chip Pearson
Guest
Posts: n/a
 
      3rd Apr 2009
Put the following code in the ThisWorkbook code module.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Target.Address = "$A$1" Then
StopBlink
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Text = "Already Posted" Then
StartBlink
End If
End If
End Sub

The blinking will start when the value changes to "Already Posted" and
will stop when the user double-clicks cell A1.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)






On Thu, 2 Apr 2009 13:56:01 -0700, ORLANDO VAZQUEZ
<(E-Mail Removed)> wrote:

>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

 
Reply With Quote
 
ORLANDO VAZQUEZ
Guest
Posts: n/a
 
      3rd Apr 2009
Thank you Chip. I know we are almost there.

But when I add that code to "thisworkbook", the lines....
Application.OnTime RunWhen......
turn red on the macors Sub StartBlink() and Sub StopBlink()
What am I missing? Thank you for sharing.

Here is how it looks at present:

Module7:

Public RunWhen As Double

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


ThisWorkbook:

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Address = "$G$6" Then
StopBlink
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$G$6" Then
If Target.Text = "Already Posted" Then
StartBlink
End If
End Sub




Orlando Vazquez


"Chip Pearson" wrote:

> Put the following code in the ThisWorkbook code module.
>
> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
> As Boolean)
> If Target.Address = "$A$1" Then
> StopBlink
> End If
> End Sub
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> If Target.Address = "$A$1" Then
> If Target.Text = "Already Posted" Then
> StartBlink
> End If
> End If
> End Sub
>
> The blinking will start when the value changes to "Already Posted" and
> will stop when the user double-clicks cell A1.
>
> Cordially,
> Chip Pearson
> Microsoft Most Valuable Professional
> Excel Product Group, 1998 - 2009
> Pearson Software Consulting, LLC
> www.cpearson.com
> (email on web site)
>
>
>
>
>
>
> On Thu, 2 Apr 2009 13:56:01 -0700, ORLANDO VAZQUEZ
> <(E-Mail Removed)> wrote:
>
> >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

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
blinking cell =?Utf-8?B?a3Rpc3Fq?= Microsoft Excel Misc 5 9th Sep 2009 07:04 AM
Blinking cell PBANKS Microsoft Excel Misc 4 30th Jun 2006 04:32 PM
Blinking Cell Dr.Ile Microsoft Excel Programming 1 15th Nov 2004 09:04 AM
Blinking Cell =?Utf-8?B?TWljb3Mz?= Microsoft Excel Misc 5 21st Jun 2004 03:44 PM
blinking cell? Martyn Microsoft Excel Discussion 12 13th Jun 2004 03:36 PM


Features
 

Advertising
 

Newsgroups
 


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