hello
I need fixing this error subscript out of range .
by the way this code works for file but when implement in another shows the error .
I need fixing this error subscript out of range .
VBA Code:
Sheets(ComboBox1.Text).Visible = xlSheetVisible
VBA Code:
Private Sub ComboBox1_Change()
Dim sh As Worksheet
Application.ScreenUpdating = False
Sheets(ComboBox1.Text).Visible = xlSheetVisible
For Each sh In ThisWorkbook.Sheets
If sh.Name <> ComboBox1.Text And sh.Name <> "input" Then
sh.Visible = xlSheetHidden
End If
Next sh
Application.ScreenUpdating = True
End Sub