ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding sheets with macro disabled - with a big twist! (https://www.excelbanter.com/excel-programming/296031-hiding-sheets-macro-disabled-big-twist.html)

Tim[_36_]

Hiding sheets with macro disabled - with a big twist!
 
Any help on this problem would be appreciated.

I have a work book with 13 sheets. Prior to distributing the work book
to clients I 'very hide' selected sheets so they cannot view the
information contained on the sheets. The sheets I 'very hide' depend
on what type of client I send the work book to and every client is
slightly different.Therefore the hidden sheet selection changes every
time I send out the work book.

My problem...
If the client does not enable macros I want him to see only a warning
sheet (saying in order to view this workbook you must select 'enable
macros'). However if he does enable macros I want him to see only the
sheets I want him to.

I know how to do this when macros are enabled and all sheets, except
the warning sheet are ment to be visible however how do I still 'very
hide' the sheets I want 'very hidden'?

Any ideas would be appreciated.
Thanks
Tim

Robin Hammond[_2_]

Hiding sheets with macro disabled - with a big twist!
 
Tim,

I would "very hide" all sheets (nice turn of phrase), except one which just
displays a big warning.

Have a sheet that is always hidden which contains your worksheet names and a
flag that dictates whether they should be unhidden or not for this
particular customer. This should be much easier to maintain than changing
code.

Put an auto_open macro in a general module that runs through the list of
sheets unhiding those you have flagged for the customer, then hides the
warning sheet.

Robin Hammond
www.enhanceddatasystems.com

"Tim" wrote in message
om...
Any help on this problem would be appreciated.

I have a work book with 13 sheets. Prior to distributing the work book
to clients I 'very hide' selected sheets so they cannot view the
information contained on the sheets. The sheets I 'very hide' depend
on what type of client I send the work book to and every client is
slightly different.Therefore the hidden sheet selection changes every
time I send out the work book.

My problem...
If the client does not enable macros I want him to see only a warning
sheet (saying in order to view this workbook you must select 'enable
macros'). However if he does enable macros I want him to see only the
sheets I want him to.

I know how to do this when macros are enabled and all sheets, except
the warning sheet are ment to be visible however how do I still 'very
hide' the sheets I want 'very hidden'?

Any ideas would be appreciated.
Thanks
Tim





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com