Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Flashing Cell for a number range

I have a worksheet (sheet2, range a13:a100) that has a calculation for the
amount of flow. I want the cell to flash if the result is <200 or 300, if
the cell is blank or not a number I don't want anything to happen. I have
found some similar postings but can't figure out what I am missing. Any help
would be greatly appreciated:


Public Sub Worksheet_Change(ByVal Target As Range)
Dim BlinkRange As Range

Set BlinkRange = Range("A1:A100")

If Not Intersect(Target, BlinkRange) Is Nothing Then
If Target.Value 300 And Target.Value < 200 Then
StartBlink

If Target.Value = "" Then
StopBlink
End If
End If
End If
End Sub

Public Sub StartBlink()

Dim myBlinkRange As Range
Dim RunWhen As Long

Set BlinkRange = Range("a13:a100")

With myBlinkRange
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
Else
.Font.ColorIndex = 3
End If
End With

RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Flashing Cell for a number range

Couple of things.

Did you store the StartBlink macro in a standard code module, and the
worksheet_change procedure in the worksheet code module?

This is an impossible condition

If Target.Value 300 And Target.Value < 200 Then

It cannot possibly be 300 and <200. You Want


If Target.Value 300 Or Target.Value < 200 Then


--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
I have a worksheet (sheet2, range a13:a100) that has a calculation for the
amount of flow. I want the cell to flash if the result is <200 or 300,
if
the cell is blank or not a number I don't want anything to happen. I have
found some similar postings but can't figure out what I am missing. Any
help
would be greatly appreciated:


Public Sub Worksheet_Change(ByVal Target As Range)
Dim BlinkRange As Range

Set BlinkRange = Range("A1:A100")

If Not Intersect(Target, BlinkRange) Is Nothing Then
If Target.Value 300 And Target.Value < 200 Then
StartBlink

If Target.Value = "" Then
StopBlink
End If
End If
End If
End Sub

Public Sub StartBlink()

Dim myBlinkRange As Range
Dim RunWhen As Long

Set BlinkRange = Range("a13:a100")

With myBlinkRange
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
Else
.Font.ColorIndex = 3
End If
End With

RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Flashing Cell for a number range

Bob,

Thank you for your response. The code is stored in the worksheet on Change
event, and you are correct it should have been Or not And. The code is still
not recognizing it, because no blinking happens once you add new data. Would
it matter that these cells are formula's? I checked it using isnumber and it
comes back true. Here is the formula if that helps =(D14-D13)/(24*(C14-C13))

"Bob Phillips" wrote:

Couple of things.

Did you store the StartBlink macro in a standard code module, and the
worksheet_change procedure in the worksheet code module?

This is an impossible condition

If Target.Value 300 And Target.Value < 200 Then

It cannot possibly be 300 and <200. You Want


If Target.Value 300 Or Target.Value < 200 Then


--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
I have a worksheet (sheet2, range a13:a100) that has a calculation for the
amount of flow. I want the cell to flash if the result is <200 or 300,
if
the cell is blank or not a number I don't want anything to happen. I have
found some similar postings but can't figure out what I am missing. Any
help
would be greatly appreciated:


Public Sub Worksheet_Change(ByVal Target As Range)
Dim BlinkRange As Range

Set BlinkRange = Range("A1:A100")

If Not Intersect(Target, BlinkRange) Is Nothing Then
If Target.Value 300 And Target.Value < 200 Then
StartBlink

If Target.Value = "" Then
StopBlink
End If
End If
End If
End Sub

Public Sub StartBlink()

Dim myBlinkRange As Range
Dim RunWhen As Long

Set BlinkRange = Range("a13:a100")

With myBlinkRange
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
Else
.Font.ColorIndex = 3
End If
End With

RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True

End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Flashing Cell for a number range

Yes, that would make a difference.

Looking at your code, I foresee some problems. Do you want

--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
Bob,

Thank you for your response. The code is stored in the worksheet on Change
event, and you are correct it should have been Or not And. The code is
still
not recognizing it, because no blinking happens once you add new data.
Would
it matter that these cells are formula's? I checked it using isnumber and
it
comes back true. Here is the formula if that helps
=(D14-D13)/(24*(C14-C13))

"Bob Phillips" wrote:

Couple of things.

Did you store the StartBlink macro in a standard code module, and the
worksheet_change procedure in the worksheet code module?

This is an impossible condition

If Target.Value 300 And Target.Value < 200 Then

It cannot possibly be 300 and <200. You Want


If Target.Value 300 Or Target.Value < 200 Then


--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
I have a worksheet (sheet2, range a13:a100) that has a calculation for
the
amount of flow. I want the cell to flash if the result is <200 or
300,
if
the cell is blank or not a number I don't want anything to happen. I
have
found some similar postings but can't figure out what I am missing. Any
help
would be greatly appreciated:


Public Sub Worksheet_Change(ByVal Target As Range)
Dim BlinkRange As Range

Set BlinkRange = Range("A1:A100")

If Not Intersect(Target, BlinkRange) Is Nothing Then
If Target.Value 300 And Target.Value < 200 Then
StartBlink

If Target.Value = "" Then
StopBlink
End If
End If
End If
End Sub

Public Sub StartBlink()

Dim myBlinkRange As Range
Dim RunWhen As Long

Set BlinkRange = Range("a13:a100")

With myBlinkRange
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
Else
.Font.ColorIndex = 3
End If
End With

RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True

End Sub






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Flashing Cell for a number range

Bob,

What suggestions do you have, or is it more a pain than it is worth?

"Bob Phillips" wrote:

Yes, that would make a difference.

Looking at your code, I foresee some problems. Do you want

--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
Bob,

Thank you for your response. The code is stored in the worksheet on Change
event, and you are correct it should have been Or not And. The code is
still
not recognizing it, because no blinking happens once you add new data.
Would
it matter that these cells are formula's? I checked it using isnumber and
it
comes back true. Here is the formula if that helps
=(D14-D13)/(24*(C14-C13))

"Bob Phillips" wrote:

Couple of things.

Did you store the StartBlink macro in a standard code module, and the
worksheet_change procedure in the worksheet code module?

This is an impossible condition

If Target.Value 300 And Target.Value < 200 Then

It cannot possibly be 300 and <200. You Want


If Target.Value 300 Or Target.Value < 200 Then


--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
I have a worksheet (sheet2, range a13:a100) that has a calculation for
the
amount of flow. I want the cell to flash if the result is <200 or
300,
if
the cell is blank or not a number I don't want anything to happen. I
have
found some similar postings but can't figure out what I am missing. Any
help
would be greatly appreciated:


Public Sub Worksheet_Change(ByVal Target As Range)
Dim BlinkRange As Range

Set BlinkRange = Range("A1:A100")

If Not Intersect(Target, BlinkRange) Is Nothing Then
If Target.Value 300 And Target.Value < 200 Then
StartBlink

If Target.Value = "" Then
StopBlink
End If
End If
End If
End Sub

Public Sub StartBlink()

Dim myBlinkRange As Range
Dim RunWhen As Long

Set BlinkRange = Range("a13:a100")

With myBlinkRange
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
Else
.Font.ColorIndex = 3
End If
End With

RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True

End Sub









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Flashing Cell for a number range

No, sorry I don't know what happened to that post.

What I was asking is

- do you want to have all cells in that range flashing if any value meets
the criteria, and all off if any are blank (problem is that both situations
may arise in a range)
- do you want each to flash separately (this will require some way to
control the separate timers)
- do you want just the last affected to change (this will be difficult as we
don't know which was changed when the calculate event kicks in).

--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
Bob,

What suggestions do you have, or is it more a pain than it is worth?

"Bob Phillips" wrote:

Yes, that would make a difference.

Looking at your code, I foresee some problems. Do you want

--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
Bob,

Thank you for your response. The code is stored in the worksheet on
Change
event, and you are correct it should have been Or not And. The code is
still
not recognizing it, because no blinking happens once you add new data.
Would
it matter that these cells are formula's? I checked it using isnumber
and
it
comes back true. Here is the formula if that helps
=(D14-D13)/(24*(C14-C13))

"Bob Phillips" wrote:

Couple of things.

Did you store the StartBlink macro in a standard code module, and the
worksheet_change procedure in the worksheet code module?

This is an impossible condition

If Target.Value 300 And Target.Value < 200 Then

It cannot possibly be 300 and <200. You Want


If Target.Value 300 Or Target.Value < 200 Then


--
__________________________________
HTH

Bob

"tpeter" wrote in message
...
I have a worksheet (sheet2, range a13:a100) that has a calculation
for
the
amount of flow. I want the cell to flash if the result is <200 or
300,
if
the cell is blank or not a number I don't want anything to happen. I
have
found some similar postings but can't figure out what I am missing.
Any
help
would be greatly appreciated:


Public Sub Worksheet_Change(ByVal Target As Range)
Dim BlinkRange As Range

Set BlinkRange = Range("A1:A100")

If Not Intersect(Target, BlinkRange) Is Nothing Then
If Target.Value 300 And Target.Value < 200 Then
StartBlink

If Target.Value = "" Then
StopBlink
End If
End If
End If
End Sub

Public Sub StartBlink()

Dim myBlinkRange As Range
Dim RunWhen As Long

Set BlinkRange = Range("a13:a100")

With myBlinkRange
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
Else
.Font.ColorIndex = 3
End If
End With

RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True

End Sub









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
Cell flashing MAX Excel Worksheet Functions 2 April 24th 09 07:32 PM
flashing cell because Excel Discussion (Misc queries) 3 May 27th 07 01:16 PM
Flashing cell Lloyd Excel Worksheet Functions 1 November 20th 06 12:47 PM
Flashing Cell HRH Excel Programming 5 September 6th 04 09:10 AM
Flashing Cell Zak Excel Programming 2 December 3rd 03 01:23 PM


All times are GMT +1. The time now is 07:13 PM.

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"