Or try maybe this code:
1. UserForm1 module:
Option Explicit
Private Sub UserForm_Initialize()
With UserForm1
.Caption = "Test window"
.DropDown1.List() = Array("1", "2", "3") 'Testing for 3 sheets
End With
End Sub
Private Sub DropDown1_Change()
With UserForm1.DropDown1
If .Value = ActiveSheet.Name Then Exit Sub
Call combo_execute(.Value)
End With
End Sub
Private Sub combo_execute(shtName As String)
Sheets(shtName).Visible = True
ActiveSheet.Visible = False
Application.GoTo Reference:=ActiveSheet.Range("a1"), Scroll:=True
End Sub
Before you run the macro, hide sheets except one with any name (of course, one in the names range of your sheets).
Bookmarks