Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim i As Variant, c As Range
With Sh
If .Name Like "Taxe*" Then 'critère
Application.ScreenUpdating = False
.Rows.Hidden = False 'RAZ
i = Application.Match(9 ^ 9, .[A:A])
If IsError(i) Then Exit Sub 'sécurité
Set c = .[B:B].Find("Total", .Cells(i, 2), xlValues, xlWhole)
If c Is Nothing Then MsgBox "Total non trouvé !", 48: Exit Sub
.Rows(i + 1 & ":" & Application.Match("zzz", .[B:B])).Hidden = True
c.EntireRow.Hidden = False
'---sauts de pages---
.ResetAllPageBreaks
If Not .Rows(32).Hidden Then .HPageBreaks.Add Before:=.Rows(32)
If Not .Rows(55).Hidden Then .HPageBreaks.Add Before:=.Rows(55)
End If
End With
End Sub