Hey all,
I am trying to hide/unhide multiple sheets with a checkbox click.. but there is an error that keeps on appearing,, (Error 9: Subscript out of range)
How i can solve this error?Please Login or Register to view this content.
Thanks
Hey all,
I am trying to hide/unhide multiple sheets with a checkbox click.. but there is an error that keeps on appearing,, (Error 9: Subscript out of range)
How i can solve this error?Please Login or Register to view this content.
Thanks
Last edited by nada.A; 04-12-2017 at 05:02 AM.
One/some of sheet(s) name spelled wrong or missing.
I am copying & pasting sheet names in the code to ensure their correct spelling.. All are correct.
Deleted........Not relevant
Last edited by sintek; 04-12-2017 at 04:10 AM.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Hi Nada.A
Are you able to upload a sample workbook depicting sheet names
Untitled.png
this is what it look like
i want when i click the first checkbox (Lusail_DC1_2s) to unhide all 8 Green sheets named in the code... otherwise, kept hide.
when i try to run the code it shows error 9
Are you certain that the worksheet names are all correct
Please Login or Register to view this content.
thank you for editing my code.. i have tried it but same error appears..
i am very sure that all worksheet names are spelled correctly.
Best you upload your workbook ?
https://www.dropbox.com/s/02hlbpxjsf...list.xlsm?dl=0
this is a link to download my workbook
appreciate your help
Try this
Please Login or Register to view this content.
The above code solves your problem
Change to this:
Please Login or Register to view this content.
Please Login or Register to view this content.
PS the reason for your error:
Worksheets("Lusail_DC1_2S_UC") had an extra space Worksheets("Lusail_DC1_2S_UC ")
works perfectly !
thank you so much sintek
i have been trying to solve this error for 4 days :/ ... shocked for how simple my mistake was ... thank you for your time sintek and jindon
Pleasure nada.A
If you are happy with result, please mark thread as solved and perhaps add a rep point by clicking star *Add Reputation...
Why so lengthy codes?
See my post #15
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks