View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Executor Executor is offline
external usenet poster
 
Posts: 74
Default Hide whole row when cel C3 is 0 (zero)

Hi Berry,

I tested it without a C in any of the cells.


Try this:

Private Sub Worksheet_Calculate()
Dim lRowLoop As Long
Application.EnableEvents = False
For lRowLoop = 1 To UsedRange.Rows.Count
If Cells(lRowLoop, 3).Value = 0 Then
Cells(lRowLoop, 3).EntireRow.Hidden = True
ElseIf Cells(lRowLoop, 3).Value = "C" Then
Cells(lRowLoop, 3).EntireRow.Hidden = True
Else
Cells(lRowLoop, 3).EntireRow.Hidden = False
End If
Next
Application.EnableEvents = True
End Sub

HTH,

Executor.

Berry wrote:
Hi Wouter,

It is almost working, but now when the sheet is calculating my screen
start tripping, when I Debug the code the sheet mark End if yellow.
Do you know what''s wrong.

Maybe I can send you the file.

Greets