I am trying to hide some columns dependent on the contents of row 1 of each column. I have entered a zero in a number of the columns in the appropriate first row but absolutely nothing happens when I hit the button, Any help on where I'm going wrong is much appreciated.

Private Sub CommandButton1_Click()
Dim i As Long

With ActiveSheet.Unprotect

Application.ScreenUpdating = False
Columns.Hidden = False
For i = Cells(1, Columns.Count).End(xlToLeft).Column To 1 Step -1
    If Cells(1, i) = 0 Then Cells(1, i).EntireColumn.Hidden = True
Next i
 
Application.ScreenUpdating = True
End With
End Sub