Dim i As Integer
Dim SheetCount As Long
SheetCount = ThisWorkbook.Worksheets.Count
If Sheets("Sheet1").Cells(1, "A").Value2 = "ALL" Then
For i = 2 To SheetCount
Sheets(i).Visible = xlSheetVisible
Next i
Else
For i = 2 To SheetCount
If Sheets(i).Name = Sheets("Sheet1").Cells(1, "A").Value2 Then
Sheets(i).Visible = xlSheetVisible
Else
Sheets(i).Visible = xlSheetHidden
End If
Next i
End If
Dump that into Sheet1's VBA
EDIT: Remove the target statement all together or change the range from "A1" to "A1:A2", and just add my code to the existing "Worksheet Change" code. ....I believe is the solution
Bookmarks