Private Sub Workbook_Open()
DébutClignote Me.Worksheets(1).CmdDémarrer
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
FinClignote
End Sub
Private Bouton As Object, HOT As Date
Sub DébutClignote(ByVal BoutonConcerné As Object)
Set Bouton = BoutonConcerné
Clignote
End Sub
Sub Clignote()
If Bouton Is Nothing Then Exit Sub
Bouton.BackColor = IIf(Bouton.BackColor = &H9333FF, vbYellow, &H9333FF)
HOT = Now + TimeSerial(0, 0, 1)
Application.OnTime HOT, "Clignote"
End Sub
Sub FinClignote()
If HOT = 0 Then Exit Sub
Application.OnTime HOT, "Clignote", Schedule:=False
HOT = 0
Bouton.BackColor = vbGreen
Set...
Private Sub Workbook_Open()
DébutClignote Me.Worksheets(1).CmdDémarrer
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
FinClignote
End Sub
Private Bouton As Object, HOT As Date
Sub DébutClignote(ByVal BoutonConcerné As Object)
Set Bouton = BoutonConcerné
Clignote
End Sub
Sub Clignote()
If Bouton Is Nothing Then Exit Sub
Bouton.BackColor = IIf(Bouton.BackColor = &H9333FF, vbYellow, &H9333FF)
HOT = Now + TimeSerial(0, 0, 1)
Application.OnTime HOT, "Clignote"
End Sub
Sub FinClignote()
If HOT = 0 Then Exit Sub
Application.OnTime HOT, "Clignote", Schedule:=False
HOT = 0
Bouton.BackColor = vbGreen
Set Bouton = Nothing
End Sub