hello
I just try showing sheet based on selection from dropdown and hide the others.
every time when select sheet should show based on A1 and hide the others , but gives mismatch error in this line
MyChoice = Target.Value
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyChoice As Long
Dim sh As Worksheet
Application.ScreenUpdating = False
If Not Intersect(Target, [A1]) Is Nothing Then
MyChoice = Target.Value
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> "Input" Then sh.Visible = False
Next sh
Sheets(MyChoice).Visible = True
End If
Application.ScreenUpdating = True
End Sub
any idea to fix error ?