Thread
:
Hiding rows based on cell content
View Single Post
#
6
Posted to microsoft.public.excel.programming
Nigel[_3_]
external usenet poster
Posts: 31
Hiding rows based on cell content
Dim lRow As Long
With Sheets("Bulk MO")
.Unprotect
For lRow = 14 To 50 Step 3
If .Cells(lRow, 1).Value = 0 Then
.Rows(lRow & ":" & lRow + 2).EntireRow.Hidden = True
End If
Next
.Protect
End With
--
Regards,
Nigel
"Doug Howell" wrote in message
...
Sheets("Bulk MO").Visible = True
Sheets("Bulk MO").Select
Sheets("Bulk MO").Unprotect
Dim lRow As Long
For lRow = 14 To 50 Step 3
If Cells(lRow, 1).Value = 0 Then
Rows(lRow & ":" & lRow + 2).EntireRow.Hidden = True
End If
Next
Sheets("Bulk MO").Protect
Sheets("Bulk MO").Visible = False
Gives an error:
Run-time error '1004':
Unable to set the Hidden property of the Range class
Reply With Quote
Nigel[_3_]
View Public Profile
Find all posts by Nigel[_3_]