Moderatori: Anthony47, Flash30005
Private Sub Worksheet_Activate()
Tempo = 0
Call Lampeggia
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$P$3" Then Exit Sub
Tempo = 0
Call Lampeggia
End Sub
Public Tempo As Integer
Sub Lampeggia()
If Tempo > 8 Then Exit Sub ' il tempo in sec che lampeggera'
If ActiveWorkbook.Name <> ThisWorkbook.Name Then Exit Sub 'Confronto nome file
FOGLIO = "Foglio1"
If ActiveSheet.Name <> FOGLIO Then Exit Sub 'Confronto nome foglio
If Tempo > 5 Then ' il tempo in sec che lampeggera'
Tempo = 0
GoTo Esci
End If
Tempo = Tempo + 1
Static FLASH As Boolean
Dim DELTAt As Date
DELTAt = "00:00:01"
If Val(ThisWorkbook.Sheets(FOGLIO).Range("P3")) > 0 Then '<<< ora e' cosi
Select Case FLASH
Case True
Sheets(FOGLIO).Cells(3, 16).Interior.Color = RGB(255, 255, 0) 'giallo
Case Else
Sheets(FOGLIO).Cells(3, 16).Interior.Color = RGB(255, 0, 0) 'ROSSO
End Select
Else
Cells(3, 16).Interior.ColorIndex = xlNone 'Nessun colore
End If
Esci:
FLASH = Not (FLASH)
Application.OnTime Now + TimeValue(DELTAt), "LAMPEGGIA"
End Sub
Sub Sale()
[P2] = [P2] + 1
If [P2] < 80 Then [P2] = 80
If [P2] > 89 Then [P2] = 0
End Sub
Sub Scende()
[P2] = [P2] - 1
If [P2] < 80 Then [P2] = 0
End Sub
Torna a Applicazioni Office Windows
Inserimento parziale valore cella in MessageBox Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 3 |
Macro modifica date scelta periodo Autore: Ricky0185 |
Forum: Applicazioni Office Windows Risposte: 11 |
Supporto per sviluppo macro VBA Ordinare per data Autore: Carletto Ribolla |
Forum: Applicazioni Office Windows Risposte: 3 |
Visitano il forum: Marius44 e 29 ospiti