Below is the code I'm using to hide rows on my protected worksheet. What I want is all cells in colmn "A" that has "1" will be hidden. This is what I have but it takes forever. Thanks in advance for ANY help.
Code:
Private Sub CommandButton1_Click()
ActiveSheet.Unprotect Password:="password"
For a = 2 To 5000
If Worksheets("CLIENT SCHEDULE").Cells(a, 1).Value = "1" Then
Worksheets("CLIENT SCHEDULE").Rows(a).Hidden = True
End If
Next
ActiveSheet.Protect Password:="password"
End Sub
Private Sub CommandButton2_Click()
For a = 2 To 5000
If Worksheets("CLIENT SCHEDULE").Cells(a, 1).Value = "1" Then
Worksheets("CLIENT SCHEDULE").Rows(a).Hidden = False
End If
Next
End Sub
Last edited by a moderator: