1. When the Sheets "Overview" or "General" are activated, means you change from another sheet to one of these the "Worksheet_Activate" event is triggered. The following code in located in the worksheet module of "General" and "Overview" sheet.
It will call the sub "AllSheetsVisible" with parameter "2"
2. The sub "AllSheetsVisible" is setting the visibility of all sheets to "2" but skipping "General" and "Overview":
3. Now to make a sheet visible select a sheet from the combobox and press the button, when the button is pressed the "Private Sub BUTTONNAME_Click()" event is triggered. It will call "AllSheetsVisible" again to hide all previously opened sheets and unhides and activates the sheet from the combobox.
4. Now you might wonder how the combobox is filled with the sheetnames, this happens each time the workbook is opened, so if you add sheets, reopen the file. The filling takes place in the "ThisWorkbook" module with:
5. If the worksheet names "Overview" or "General" changes you have to change this in the code as they are skipped in each operation.
Bookmarks