Public activation As Boolean 'mémorise la variable
Sub ArrierePlan()
'menu Exécution => Réinitialiser pour arrêter la macro
Dim t#, tablo, resu(), i&
Do
If activation Then ThisWorkbook.Saved = False: activation = False
t = Timer + 0.5
While Timer < t And t < 86400: DoEvents: Wend 'attente de 0,5 seconde
If Not ThisWorkbook.Saved And TypeName(ActiveSheet) = "Worksheet" Then
With ActiveSheet.[A1].CurrentRegion.Columns(6)
tablo = .Resize(, 2) 'matrice, plus rapide, au moins 2 éléments
ReDim resu(1 To UBound(tablo), 1 To 1)
For i = 2 To UBound(tablo)
If tablo(i, 1) <> "" And .Cells(i).Comment Is Nothing Then resu(i, 1) = "Pas de commentaire"
Next
.Columns(2) = resu 'restitution
End With
ThisWorkbook.Saved = True 'évite le recalcul
End If
Loop
End Sub