View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ruan[_3_] Ruan[_3_] is offline
external usenet poster
 
Posts: 33
Default Hiding selected Row

Thanks Chan. I get an error when I run the code though. I will keep playing
with it.
Ruan



"Chan" wrote in message
...
Try this:

Sub HideRows1()
Worksheets("Jul").Unprotect Password:="abcd"

' Hide Selected Rows on the Worksheet
For each c in ("B11:B119")
If c.value = "X" then
.EntireRow.Hidden = True
Else
.EntireRow.Hidden = False
End if
Next

Range("C11").Select
Worksheets("Aug").Protect Password:="abcd", Scenarios:=True

End Sub