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
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