Crazy request here. Is there VBA code that will hide a sheet when it is deselected? Ex: I am on sheet2, I click the tab to change to sheet1 and sheet2 hides itself.
I will assume this goes into the specific sheet module.
Your help is appreciated.
Crazy request here. Is there VBA code that will hide a sheet when it is deselected? Ex: I am on sheet2, I click the tab to change to sheet1 and sheet2 hides itself.
I will assume this goes into the specific sheet module.
Your help is appreciated.
At a really basic level, the Workbook_SheetDeactivate event could handle this. The only issue, is that eventually you get down to just one worksheet. Even if you unhide one of the sheets that get hidden due to this macro, it immediately hides the sheet that was visible. Maybe that's ok?
This code would go into the ThisWorkbook module in the VB Editor.Please Login or Register to view this content.
Hey, thank you for the reply. What would the code look like for a single sheet("Sheet2") and not the entire workbook? I only want that sheet to be hidden after deselection.
Thank you,
Ken
Please Login or Register to view this content.
Very cool, thank you.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks