Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Leona Wright   on Dec 07 In MS Office Category.

  
Question Answered By: Velma Adams   on Dec 07

This code  should work on whichever sheet is the active sheet, so it
should run on all of them. Unless what you want is for all the sheets
to be processed in one run of the macro? In which case (untested):

Sub hide()
For each ws in activeworkbook.sheets
Dim rw
For Each rw In ws.UsedRange.Rows
If rw.Cells(3) = 0 And rw.Cells(5) = 0 And rw.Cells(6) = 0 Then
rw.Hidden = True
Next rw
next ws
End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Using code on multiple worksheets in a workbook Or get search suggestion and latest updates.


Tagged: