LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Hide sheets by cell value

I am making a database in excel in which two types of information is
beeing produced. Yearly figures and year to date figures. Both type's
consist of multiple sheets (more that 20 is normal), with details
about certain markets. By a dropdown menu i would like to have a
selection on seeing only the sheets in producing the yearly figures or
the YTD figures.

I have the following working on one sheet, but I don't want to write
it for each sheet with a different name. I also noticed that when I
change the sheetname the macro quits working.

Dim sh As Worksheet
Set sh = Worksheets("Assumptions")
With Sheets("P&L current")
If sh.Range("Ae1").Value = 2 Then
.Visible = xlSheetVisible
ElseIf sh.Range("Ae1").Value = 1 Then
.Visible = xlSheetHidden
End If

The dropdown menu puts the value 1 or 2 in cell Ae1. is it possible
that a macro looks in every sheet for cell AE1 and hides or unhides it
by the value 1 or 2???

 
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
Macro to hide sheets based upon cell value Joe M. Excel Discussion (Misc queries) 3 January 13th 10 07:05 PM
Hide or unhide sheets based on cell billinr Excel Discussion (Misc queries) 2 July 13th 07 07:42 PM
Hide sheets based on Cell value Mike Milmoe Excel Discussion (Misc queries) 4 January 16th 07 05:57 AM
Hide all sheets but selected sheets - an example [email protected] Excel Programming 1 April 7th 06 06:29 PM
Hide Certain Sheets based on Cell Data Volsfan Excel Programming 2 August 10th 05 02:26 PM


All times are GMT +1. The time now is 05:11 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"