oui c'est bien mais pas idéal si je fais une modification sur une partie qui a été masqué a l'impression presedante je doit oter le mot de passe reaffiche les ligne pour apres relancé
j'ai trouvé sa mais je ne sais pas le modifie pour qu'il s'applique a mon tableau
un exemple avec 2 boutons bascule, le premier si on ne teste que les vides de la colonne A et le second si on teste tous les vides (8 colonnes).
Code :
Private Sub ToggleButton1_Click()
Dim Li As Integer, col As Byte
Application.ScreenUpdating = False
[A16:A207].EntireRow.Hidden = 0
ToggleButton1.Caption = IIf(ToggleButton1.Caption = "cacher", "afficher", "cacher")
For Li = 16 To 207
If ToggleButton1.Caption = "afficher" And (Cells(Li, 1) = "" Or Cells(Li, 1) = 0) Then Rows(Li).Hidden = 1
Next
Application.ScreenUpdating = True
'If ToggleButton1.Caption = "afficher" Then [A1:H207].PrintPreview
End Sub
Private Sub ToggleButton2_Click()
Dim Li As Integer, col As Byte
Application.ScreenUpdating = False
[A16:A207].EntireRow.Hidden = 0
ToggleButton2.Caption = IIf(ToggleButton2.Caption = "cacher", "afficher", "cacher")
For Li = 16 To 207
For col = 1 To 8
If ToggleButton2.Caption = "afficher" And (Cells(Li, col) = "" Or Cells(Li, col) = 0) Then Rows(Li).Hidden = 1: Exit For
Next
Next
Application.ScreenUpdating = True
'If ToggleButton2.Caption = "afficher" Then [A1:H207].PrintPreview
End Sub