December 16, 2021
I found a solution to hide tabs that I don't need to show, the downside is all other tabs get hidden however I want a summary tab to show AND the tab (or tabs) selected. A sample file that has the macro to show the selected tab is attached plus a screenshot below.
Not sure if this is possible but this solution (whether it is a macro, an addin (can they be attached to the file and always be present??)) needs to work for others as well, i.e., there can't be custom addins etc. be needed, all has to be w/in this file.
I have to say I have no clue about VBA therefore I may not completely know how to do things, i.e., I would appreciate detailed guidance if possible.
Thank you
Trusted Members
Moderators
November 1, 2018
Change the ShowSelSheets code in Module1 to:
Sub ShowSelSheets()
Dim ws As Worksheet
Dim strType As String
strType = Worksheets("Menu").Range("SelectType").Value
For Each ws In ActiveWorkbook.Sheets
If InStr(1, ws.Name, strType) > 0 Then
ws.Visible = xlSheetVisible
Else
Select Case LCase$(ws.Name)
Case "menu", "summary"
ws.Visible = xlSheetVisible
Case Else
ws.Visible = xlSheetHidden
End Select
End If
Next ws
End Sub
Answers Post
December 16, 2021
Thank you, that indeed does the trick. I now have 3 sheets visible (Menu, Summary, Testing 1/2/3/4).
Is it possible to expand that to other tabs so one could see let's say 4 or more tabs at once (like Menu/Summary, Testing 1, Testing 2).
In other words can there be a selection (maybe via multiple dropdown lists w/the same content) for showing several tabs at once depending upon user choice/needs?
1 Guest(s)