Instead of placing a button on every sheet, you may be interested in considering a simple combobox on the menu bar, which would always be visible no matter what sheet is active (because it's the menu bar) and requires no hyperlinks or drop-downs in worksheet cells.
Try this as an alternative:
Step 1
Find the little Excel workbook icon near the upper left corner of your workbook window, usually just to the left of the File menu option. Right click on that icon, left click on View Code, and paste the following procedures into the large white area that is the workbook module:
Code:
Private Sub Workbook_Open()
Run "ResetMenu"
Run "MakeCBO"
Dim TymeOfDay$
If Time < 0.5 Then
TymeOfDay = "Good Morning !!" & vbCrLf & vbCrLf
ElseIf Time >= 0.5 And Time < 0.75 Then
TymeOfDay = "Good Afternoon !!" & vbCrLf & vbCrLf
Else
TymeOfDay = "Good Evening !!" & vbCrLf & vbCrLf
End If
MsgBox _
TymeOfDay & _
"To quickly and easily activate any sheet," & vbCrLf & _
"select a sheet name from the drop-down list" & vbCrLf & _
"that is located on the menu bar near the top" & vbCrLf & _
"of the screen, next to the ''Help'' button.", _
64, "Sheet navigation tip:"
End Sub
Private Sub Workbook_Activate()
Run "ResetMenu"
Run "MakeCBO"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Run "ResetMenu"
ThisWorkbook.Save
End Sub
Private Sub Workbook_Deactivate()
Run "ResetMenu"
End Sub
Step 2
While you are still in the Visual Basic Editor, from that menu bar, click Insert > Module and paste the following code into that new module:
Code:
Private Sub ResetMenu()
On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("Sheet selector").Delete
Err.Clear
End Sub
Private Sub MakeCBO()
With Application
.ScreenUpdating = False
Run "ResetMenu"
Dim cboSheetz As CommandBarComboBox, ws As Worksheet
With .CommandBars("Worksheet Menu Bar")
Set cboSheetz = .Controls.Add(Type:=msoControlComboBox, before:=.Controls.Count)
End With
With cboSheetz
.Caption = "Sheet selector"
.OnAction = "mySheet"
End With
For Each ws In Worksheets
cboSheetz.AddItem ws.Name
Next ws
.ScreenUpdating = True
End With
End Sub
Private Sub mySheet()
Application.ScreenUpdating = False
With CommandBars("Worksheet Menu Bar").Controls("Sheet selector")
With Worksheets(.List(.ListIndex))
.Visible = xlSheetVisible
.Activate
End With
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name <> .List(.ListIndex) Then ws.Visible = xlSheetVeryHidden
Next ws
End With
Application.ScreenUpdating = True
End Sub
Step 3
Press Alt+Q to return to the worksheet.
Step 4
Save the workbook.
Step 5
Close the workbook.
Step 6
Re-open the workbook and see if what happens is what you want, which will be:
- a message box advises the user of the combobox so they know what is going on.
- a combobox with visible sheets' names is on the menu bar.
- the combobox will only be visible when that workbook is active.
- selecting a sheet name will take you to that sheet and hide all the other sheets, which is what you said you wanted.