Bonsoir le forum,

j'ai ce code qui fonctionne très bien (fait par papounet) mais comment faire pour qu'il fonctionne pour toute les feuilles
merci d'avance
jacky
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Sub MasquerLignes()
Dim Cel As Range, Plage As Range, sh As Object
 
For Each sh In Sheets
  If sh.Name Like "CG SD*" Then
    With sh
      For Each Cel In .Range("D:D").SpecialCells(xlCellTypeConstants)
        If Cel.Value Like "Dos*" And Cel.Offset(1, 0) = "" Then
          If Plage Is Nothing Then
            Set Plage = Cel.Offset(-1, 0).Resize(10, 1)
            Else
            Set Plage = Application.Union(Plage, Cel.Offset(-1, 0).Resize(10, 1))
          End If
        End If
      Next
    End With
    Plage.EntireRow.Hidden = True
    Set Plage = Nothing
  End If
Next
End Sub