Sub SautDePage()
Dim c As Range, i As Integer
With Feuil1
[COLOR="Red"]'---Supprime tous les sauts de page situés dans une ZONE IMPRIMABLE---
For i = .HPageBreaks.Count To 1 Step -1
.HPageBreaks(i).Delete
Next[/COLOR]
'---Ajoute un saut de page [COLOR="Red"]APRES[/COLOR] la cellule contenant au moins 3 tirets---
For Each c In .Range("A1:A" & [A65536].End(xlUp).Row)
If c Like "---*" Then
.HPageBreaks.Add Before:=[COLOR="Red"]c.Offset(1)[/COLOR]
i = i + 1
If i = 1026 Then Exit Sub [COLOR="Red"]'variante => If .HPageBreaks.Count = 1026 Then Exit Sub[/COLOR]
End If
Next
End With
End Sub