Sub Évènements()
Application.EnableEvents = Not Application.EnableEvents
BoutonMsg Application.EnableEvents, _
"Traiter évènements", "Prise en charge des évènements RÉACTIVÉE", 6852, _
"Ignorer évènements", "Prise en charge des évènements DÉSACTIVÉE", 1019
If Not UfÉvènements.Visible Then
UfÉvènements.Afficher
SetTimer 0, 0, 40, AddressOf TimerÉvèn
End If
End Sub
Private Static Sub TimerÉvèn(ByVal hwnd As Long, ByVal uMsg As Integer, ByVal idEvent As Integer, ByVal dwTime As Long)
Dim ÉtatNoté As Boolean
If Application.EnableEvents Xor ÉtatNoté Then
ÉtatNoté = Application.EnableEvents
BoutonMsg ÉtatNoté, "Traiter évènements", "", 6852, "Ignorer évènements", "", 1019
End If
If Not UfÉvènements.Visible Then KillTimer 0, idEvent Else UfÉvènements.MàJParTimer
End Sub