Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop to hide sheet based on cell
Hi,
I am trying to create a simple loop to hide worksheets in my workbook based on value reported on a specific cell on each worksheet. If value on cell B8 on the worksheet is equal to "No Data", hide this worksheet. If not, keep visible. Then go to the next worksheet. Thanks for your help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Loop to hide sheet based on cell
hi,
On Error Resume Next For Each oSheet In Worksheets If oSheet.Range("B8") = "No Data" Then oSheet.Visible = False If Err.Number < 0 Then Err.Clear: Exit Sub Else oSheet.Visible = True End If Next -- isabelle Le 2011-10-06 10:35, Norvascom a écrit : Hi, I am trying to create a simple loop to hide worksheets in my workbook based on value reported on a specific cell on each worksheet. If value on cell B8 on the worksheet is equal to "No Data", hide this worksheet. If not, keep visible. Then go to the next worksheet. Thanks for your help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide rows of one sheet based on values in another sheet? | Excel Programming | |||
Hide a sheet based on a cell condition | Excel Programming | |||
CF based on data analysis, Loop thru sheet | Excel Programming | |||
Hide a sheet based on value! | Excel Programming | |||
Hide/unhide sheet macro based on cell calculation | Excel Programming |