Roy, Thanks for the replay. Yes I’m selecting the sheets when recording the macro.
I made a small workbook with 5 sheets and replaced the code for the bottoms (4) with your code, but when made another button for the "Hide All" and record the macro and run it with 2 sheets visible, the same error is popping up; Run time error '1004' Selected Method of Sheet Class Failed.
It does it when some sheets are visible or when all are hiden.
I think I can disable "Hide All" and enable "Show All" after the sheets are hiden to avoid user presing "Hide All" again, but the problem is when some are visible.
I think the more accurate question will be; “How can I hide the all the sheets when some of them are still visible with the “Hide All” button, what will be the best construct to use in the “Hide All”- “Show All” buttons.
Also want to make clear that all buttons are in Sheet1, and this should be always visible, and sheet have names, so no Sheet1, Sheet2 can be use as default.
Hope this is more understandable
Bookmarks