XL 2016 Masquer les ZERO dans des colonnes

Fonziino

XLDnaute Nouveau
Bonjour,

Je souhaite masquer les zéros de la colonne D à M.

Je souhaite que les Zéros se masquent avec un bouton "masquer" et "afficher".

quand j'utilise un ancien code il me dit que j'ai un problème :

Private Sub CommandButton1_Click()
Dim i&, Clc&
Application.ScreenUpdating = False
Clc = Application.Calculation
Application.Calculation = xlCalculationManual
With Me
Select Case .CommandButton1.Caption
Case "Masquer"
For i = .Cells(.Rows.Count, 1).End(3).Row To 1 Step -1
.Rows(i).Hidden = (.Range("c" & i) = 0 And .Range("d" & i) = 0 And .Range("A" & i) <> "")
Next i
Me.CommandButton1.Caption = "Afficher"
Case Else
.Rows.Hidden = False
Me.CommandButton1.Caption = "Masquer"
End Select
End With
Application.ScreenUpdating = True
Application.Calculation = Clc
End Sub


Pouvez-vous m'aider ?

Un tout grand merci
 

Pièces jointes

  • TEST.xlsx
    51.4 KB · Affichages: 5

Discussions similaires

Réponses
2
Affichages
470

Statistiques des forums

Discussions
312 145
Messages
2 085 759
Membres
102 965
dernier inscrit
Mael44