Here is how to incorporate the method I suggested.
First, create a new sheet named "AdminList".
Then, down column A, enter all the UserNames that you wish to allow to see ALL sheets.
Then, go into the VB Editor of this workbook, and place all of the code in the "ThisWorkbook" module.
It is absolutely essential that you put this code in this "ThisWorkbook" module! Do NOT create a new module and put it there. It will not work automatically unless placed in the ThisWorkbook" module!
VBA Code:
Private Sub Workbook_Open()
Dim wsSheet As Worksheet
Dim adSheet As Worksheet
Dim rng As Range
Dim usr As String
' Set admin sheet name
Set adSheet = Sheets("AdminList")
' Get user
usr = Application.UserName
' Unhide admin list sheet
adSheet.Visible = True
' Set range where list of people allowed to see all sheets exists
Set rng = adSheet.Range("A:A")
' If user on list, unhide all sheets except for lookup list
If Application.WorksheetFunction.CountIf(rng, usr) > 0 Then
For Each wsSheet In Worksheets
wsSheet.Visible = True
Next wsSheet
End If
' Rehide admin sheet
adSheet.Visible = xlSheetVeryHidden
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim wsSheet As Worksheet
' Upon closing, hide all sheets except for two specified ones
For Each wsSheet In Worksheets
If (wsSheet.Name <> "Table of Contents (MAIN)") And (wsSheet.Name <> "Components (MAIN)") Then
wsSheet.Visible = xlSheetVeryHidden
End If
Next wsSheet
' Save changes
ActiveWorkbook.Save
End Sub
Private Sub UnhideAdminSheet()
' Run this manually when you want to unhide the AdminList sheet for editing
Sheets("AdminList").Visible = True
End Sub
Now when you open the workbook, it will see if your username is in column A of the "AdminList" sheet, and if it is, it will show you all sheets (except the "AdminList" sheet).
If you are not on the list, it will only show you those two sheets.
Then, when you close the workbook, it will hide all but those two sheets.
So, if someone were to open the workbook while disabling macros/VBA, they will only see those two sheets.
If you need to edit people in the "AdminList" simply go to the VBA code here, and manually select and run the last procedure (the one named "UnhideAdminSheet").