Ciao Giovanni,
'--------------
Vorrei che una cella che contiene il risultato di una formula lampeggiasse
quando viene raggiunto un certo valore.
Si può fare con una macro o devo usare vbe?
'--------------
Concordo con Tiziano che sia meglio evitare questo effetto,
Comunque, forse un po' meno invadente potrebbe essere:
Nel modulo Thisworkbook, incolla:
'=============>>
Private Sub Workbook_Open()
On Error Resume Next
ActiveWorkbook.Styles.Add Name:="FLASH"
On Error GoTo 0
End Sub
'<<=============
In un modulo standard, alla testa del modulo, e
prima di qualsiasi codice, incolla:
'=============>>
Option Explicit
Public blFlash As Boolean
Dim NextTime As Date
'---------------->>
Public Sub StartFlash()
NextTime = Now + TimeValue("00:00:01")
With ActiveWorkbook.Styles("Flash").Font
If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2
End With
Application.OnTime NextTime, "StartFlash"
End Sub
'---------------->>
Public Sub StopFLash()
On Error Resume Next
Application.OnTime NextTime, "StartFlash", Schedule:=False
ActiveWorkbook.Styles("Flash").Font.ColorIndex = xlAutomatic
End Sub
'<<=============
Nel Modulo del foglio, incolla:
'=============>>
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range
Dim rCell As Range
Const myvalue As Variant = 10 '<<=== da CAMBIARE
Set Rng = Me.Range("B1:B10") '<<=== da CAMBIARE
If Not Intersect(Rng, Target) Is Nothing Then
Call StopFLash
blFlash = False
For Each rCell In Rng.Cells
With rCell
If .Value > myvalue Then
blFlash = True
.Style = "FLASH"
Else
.Style = "Normal"
End If
End With
Next rCell
If blFlash Then
Call StartFlash
Else
Call StopFLash
End If
End If
End Sub
'<<=============
---
Regards,
Norman