Hi to all,
I'm developing a workbook containing 121 sheets. Sheet 1 is effectively an index, and uses 120 form control checkboxes to unhide and display the selected sheets individually.
The code I'm using for each checkbox is below and is in a module.
The code will hide the sheet again if the box is unchecked, and this is what should be done by the operator before closing the workbook. Surprise - that doesn't always happen.![]()
Please Login or Register to view this content.
I've worked out that adding the following code (for each sheet) to the workbook module does the job of hiding the sheets on opening.
I'm left with two problems and any help will be greatly appreciated.![]()
Please Login or Register to view this content.
Code to hide all the sheets on opening the workbook (except sheet 1), rather than repeating the line above 120 times?
Code to uncheck (on opening the workbook) any checkboxes which had not been unchecked when the worbook was last saved/closed? My preference is to do this automatically rather than with a macro requiring some user input.
I'm very new to vba (still at the guess-copy-try stage) so apologies if the questions have simple or obvious answers.
Thanks in advance.
Cheers.
Bookmarks