View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gooser555 Gooser555 is offline
external usenet poster
 
Posts: 3
Default Solution

Hi Ben
Not sure why you cannot recreate problem but i have come up with a solution
for my situation:

I changed the code to the following instead of Worksheet_Calculate() to:

Private Sub Worksheet_Activate()
Dim x As Integer

Application.ScreenUpdating = False
Cells.EntireRow.Hidden = False 'unhide everything

For x = 51 To 61
If Range("U" & x).Value = 0 Then
Rows(x).EntireRow.Hidden = True
End If
Next x

Application.ScreenUpdating = True
End Sub

So now when I change my data on Sheet 1, I then goto Sheet 5 & 7 and the
rows hide when I "activate" or click on the sheet. As a side note this code
also works when the sheet is protected (as long as i check allow "format
rows"). I do not have to unprotect or run a sub routine to unprotect and then
protect.

And the code works in Excel 2002 too...............

Hope this helps others.