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: 16
Default Unhide sheets based on a cell value

Hi, this problem is driving me nuts.

I have a macro warning page (shows only the warning unless you enable
macros) and can close my workbook, hiding all pages except the macro
warning page in the process.

I cannot for the life of me get any code to work when i open my
workbook.
What I have is:

1/ 21 worksheets including the macro warning sheet
2/ upon opening the workbook I want to 'very hide' 3 (or sometimes
more) sheets based upon values I have in cells.
3/ I place the values in the sheet named "Data" in a range D3:D24
4/ The cells in the range return the value TRUE or FALSE based on
the visible properties I want the sheet to have. (I set these values
by checkboxs linked to the range above).
5/ I an currently using the code (applies to two of the 21 sheetsfor
this example)

Sheets("Cover").Visible = Sheets("Data").Range("D4").Value
Sheets("KA").Visible = Sheets("Data").Range("D5").Value

and so on for the 21 sheets....
This code is used in the workbook open section.

I get the error upon opening the workbook
Error 9 script out of range

This must be either very complicated or I am very dense...could go
either way.
Any help would be appreciated.
Thanks
Tim
 
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
code to unhide tabs based on cell contents pat67 Excel Worksheet Functions 7 August 26th 11 12:43 AM
Hide or unhide sheets based on cell billinr Excel Discussion (Misc queries) 2 July 13th 07 07:42 PM
How to Unhide sheets pwermuth Excel Discussion (Misc queries) 4 July 15th 05 11:43 PM
Add sheets that are unhide Ron de Bruin Excel Programming 0 September 17th 03 10:50 PM
Add sheets that are unhide Bob Phillips[_5_] Excel Programming 0 September 17th 03 10:43 PM


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

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

About Us

"It's about Microsoft Excel"