Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JWR JWR is offline
external usenet poster
 
Posts: 3
Default a way to conditionally hide tabs in a range

Im not sure if this is possible but Im searching for a solution using a
control(selection of a cell) or button to take a range of worksheets, to
first unhide all work sheets, then check a condition in one cell on each of
the worksheets if the condition is positive then hide that sheet.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default a way to conditionally hide tabs in a range

Try something like the following:

Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
If WS.Range("A1").Value = "Show" Then
WS.Visible = xlSheetVisible
Else
WS.Visible = xlSheetHidden
End If
Next WS


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JWR" wrote in message
...
I'm not sure if this is possible but I'm searching for a
solution using a
control(selection of a cell) or button to take a range of
worksheets, to
first unhide all work sheets, then check a condition in one
cell on each of
the worksheets if the condition is positive then hide that
sheet.



  #3   Report Post  
Posted to microsoft.public.excel.misc
JWR JWR is offline
external usenet poster
 
Posts: 3
Default a way to conditionally hide tabs in a range

Great Thanks for your help!

"Chip Pearson" wrote:

Try something like the following:

Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
If WS.Range("A1").Value = "Show" Then
WS.Visible = xlSheetVisible
Else
WS.Visible = xlSheetHidden
End If
Next WS


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JWR" wrote in message
...
I'm not sure if this is possible but I'm searching for a
solution using a
control(selection of a cell) or button to take a range of
worksheets, to
first unhide all work sheets, then check a condition in one
cell on each of
the worksheets if the condition is positive then hide that
sheet.




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default a way to conditionally hide tabs in a range

The code assumes that there will always be at least one sheet
that will be made visible. A workbook cannot have 0 visible
worksheets.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JWR" wrote in message
...
Great Thanks for your help!

"Chip Pearson" wrote:

Try something like the following:

Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
If WS.Range("A1").Value = "Show" Then
WS.Visible = xlSheetVisible
Else
WS.Visible = xlSheetHidden
End If
Next WS


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JWR" wrote in message
...
I'm not sure if this is possible but I'm searching for a
solution using a
control(selection of a cell) or button to take a range of
worksheets, to
first unhide all work sheets, then check a condition in one
cell on each of
the worksheets if the condition is positive then hide that
sheet.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FORMULA at Source range (in Data-validation-List) gives wrong re Eddy Stan Excel Worksheet Functions 6 March 17th 06 07:19 AM
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? Marc New Users to Excel 1 March 10th 06 05:10 PM
Help with using range names in sum function soteman2005 Excel Worksheet Functions 2 November 28th 05 04:43 PM
Array to named range conversion... i-Zapp Excel Discussion (Misc queries) 4 October 25th 05 09:09 PM
Cannot Expand Named Range - when size of the Range exceeds Snig Excel Discussion (Misc queries) 1 July 7th 05 01:46 PM


All times are GMT +1. The time now is 07:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"