I have many reports with workings on say 28 out of 30 tabs, and where the workings need to be hidden prior to distribution. It would be nice to be able to select the two tabs I want to keep and run a macro to hide the others. I'm looking for a generic macro that will work in any workbook, hiding all worksheets that are not selected.
I got as far as this but obviously it doesn't work...
for each ws in worksheets
if ws.selected = false then ws.visible = xlVeryHidden
next ws
Many thanks in advance for any responses!
I got as far as this but obviously it doesn't work...
for each ws in worksheets
if ws.selected = false then ws.visible = xlVeryHidden
next ws
Many thanks in advance for any responses!