jwindholz2725
Board Regular
- Joined
- Sep 20, 2011
- Messages
- 94
Can anybody help please? I have a code that hides lines for me that = 0. (see below) But this only works on the active sheet. How can I make it run this code on all sheets?
Sub HideLines()
Application.ScreenUpdating = False
Dim c As Range
For Each c In Range("Q6:Q431")
If c.Value = 0 Then
Rows(c.Row).Hidden = True
Else
Rows(c.Row).Hidden = False
End If
Next c
Application.ScreenUpdating = True
ActiveSheet.ResetAllPageBreaks
With ActiveSheet.PageSetup
.Zoom = 100
End With
End Sub
Sub HideLines()
Application.ScreenUpdating = False
Dim c As Range
For Each c In Range("Q6:Q431")
If c.Value = 0 Then
Rows(c.Row).Hidden = True
Else
Rows(c.Row).Hidden = False
End If
Next c
Application.ScreenUpdating = True
ActiveSheet.ResetAllPageBreaks
With ActiveSheet.PageSetup
.Zoom = 100
End With
End Sub