Option Explicit
Const cbName As String = "myTemp"
Sub SelectASheet()
Dim oneSheet As Worksheet
On Error Resume Next
Application.CommandBars(cbName).Delete
On Error GoTo ErrorOut
With Application.CommandBars.Add(Name:=cbName, Position:=msoBarFloating, temporary:=True)
.Left = 300
.Top = 200
.Visible = True
With .Controls.Add(Type:=msoControlDropdown, temporary:=True)
.Width = 150
.Height = 30
.Visible = True
For Each oneSheet In ThisWorkbook.Worksheets
.AddItem oneSheet.Name
If oneSheet.Name = ActiveSheet.Name Then
.ListIndex = .ListCount
End If
Next oneSheet
.OnAction = "GoToSelectedSheet"
End With
End With
ErrorOut:
On Error GoTo 0
End Sub
Sub GoToSelectedSheet(Optional dummy As Boolean)
On Error Resume Next
With Application.CommandBars(cbName)
With .Controls(1)
ThisWorkbook.Sheets(.List(.ListIndex)).Activate
End With
'.Visible = False: Rem optional line
End With
On Error GoTo 0
End Sub