New feature! Upgrade and increase expert visibility of your issues with Priority Questions.
Sub HideTabs() Dim w As Worksheet Set w = Worksheets.Add w.Name = "ListOfSheets" For x = 1 To Worksheets.Count w.Cells(x, 1) = Sheets(x).Name Next wSheets = Array("SHEET1", "SHEET2", "SHEET3") wsstat = Worksheets(wSheets(0)).Visible If wsstat = xlSheetVisible Then wsstat = xlSheetHidden Else wsstat = xlSheetVisible End If For n = 0 To UBound(wSheets) Worksheets(wSheets(n)).Visible = wsstat Next n End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.