If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.

I AM LOOKING FOR A CODE OR FORMULA TO MAKE A WORKSHEET CELL BLINK O
REVERSE VIDEO IF A CERTAIN CONDITION IS FULFILLED. IN CONDITIONA
FORMATTING I COULD NOT FIND ANYTHING LIKE THIS. I AM WONDERING IF THI
COULD BE ACHIEVEABLE THROUGH VBA CODE.

Hi Darno
yes it is possible but only with code. But I strongly recommend not to
do this :-)
- You can't do anything else while the cell blinks (as the macro runs
constantly)
- Blinking cells have nothing to do with spreadsheets ;-)

The first macro makes cell A1 blink every second if the value of A1 =
1. The second macro stops the blinking
P.S.: please turn off your Caps Lock in your posts - Makes it difficult
to read and all uper case is considered as shouting in NG

--
Regards
Frank Kabel
Frankfurt, Germany
> I AM LOOKING FOR A CODE OR FORMULA TO MAKE A WORKSHEET CELL BLINK OR
> REVERSE VIDEO IF A CERTAIN CONDITION IS FULFILLED. IN CONDITIONAL
> FORMATTING I COULD NOT FIND ANYTHING LIKE THIS. I AM WONDERING IF
THIS
> COULD BE ACHIEVEABLE THROUGH VBA CODE.
>
>
> REGARDS,
>
>
> DARNO
>
>
> ---
> Message posted from http://www.ExcelForum.com/

This is one of those features that that we have not yet been blessed
with in any version of Excel.

But here is some code that is really nasty:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim n As Integer
Dim NextTime As Date
If Range("MyFlashCell").Value > 7 Then
For n = 1 To 5
With Range("MyFlashCell").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
With Range("MyFlashCell").Interior
If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End If
With Range("MyFlashCell")
..Font.ColorIndex = 3
..Interior.ColorIndex = 2
End With
End Sub

It goes in the Sheet module, it sucks processing time and creates a
delay of 5 seconds on every recalculation if MyFlashCell exceeds the
value of 7.

Don't blame me if co-workers perform surgical operations on you
without anaesthetic.

Hi Norman
also quite beautiful <vbg>
Hopefully MS never decides to implement blinking is a major feature
enhancement ;-)

--
Regards
Frank Kabel
Frankfurt, Germany

Norman Harker wrote:
> Hi Darno!
>
> This is one of those features that that we have not yet been blessed
> with in any version of Excel.
>
> But here is some code that is really nasty:
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Dim n As Integer
> Dim NextTime As Date
> If Range("MyFlashCell").Value > 7 Then
> For n = 1 To 5
> With Range("MyFlashCell").Font
> If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
> End With
> With Range("MyFlashCell").Interior
> If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3
> End With
> Application.Wait Now + TimeValue("00:00:01")
> Next
> End If
> With Range("MyFlashCell")
> .Font.ColorIndex = 3
> .Interior.ColorIndex = 2
> End With
> End Sub
>
> It goes in the Sheet module, it sucks processing time and creates a
> delay of 5 seconds on every recalculation if MyFlashCell exceeds the
> value of 7.
>
> Don't blame me if co-workers perform surgical operations on you
> without anaesthetic.
>
>> I AM LOOKING FOR A CODE OR FORMULA TO MAKE A WORKSHEET CELL BLINK OR
>> REVERSE VIDEO IF A CERTAIN CONDITION IS FULFILLED. IN CONDITIONAL
>> FORMATTING I COULD NOT FIND ANYTHING LIKE THIS. I AM WONDERING IF
>> THIS COULD BE ACHIEVEABLE THROUGH VBA CODE.
>>
>>
>> REGARDS,
>>
>>
>> DARNO
>>
>>
>> ---
>> Message posted from http://www.ExcelForum.com/

I wish to deny the rumour that you're spreading that I got transported
to Australia for flashing.

Will this make you happier; he says knowing the answer. At least it
only flashes if there's a change to the offending cell.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("MyFlashCell")) Is Nothing Then Exit Sub
Dim n As Integer
Dim NextTime As Date
If Range("MyFlashCell").Value > 7 Then
For n = 1 To 5
With Range("MyFlashCell").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
With Range("MyFlashCell").Interior
If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3
End With
Application.Wait Now + TimeValue("00:00:01")
Next
End If
With Range("MyFlashCell")
..Font.ColorIndex = 3
..Interior.ColorIndex = 2
End With
End Sub