Share via

Macro for selecting hide/unhide multiple tabs?

Anonymous
2014-05-29T15:04:18+00:00

Can anyone help me determine if there is a macro to help me with hiding/unhiding tabs within a file? I have about 150 tabs and I only need to hide/unhide certain tabs. Right now, I have to hide/unhide one at a time. I have a macro that will allow me unhide all but that leaves me with the task of hiding all of the tabs that I do not need.

Any help is greatly appreciated.

Thanks!

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2014-05-30T04:17:48+00:00

    Hi,

    take a look here, maybe could help....

    http://answers.microsoft.com/en-us/office/forum/officeversion_other-excel/password-protecting-a-workbook-that-has-worksheet/2d53bfd6-7574-4ee6-ad61-9af90646f6bf

    (if you want, ignore/delete the lines: protect - unprotect, Locked = False....)

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-05-30T02:06:15+00:00

    Hi- I could select the tabs to hide. The main issue is the "one at a time" tabs to unhide.

    Try this one.

    Select any two sheets that have hidden sheets between them.  Run macro to unhide all.

    Sub UnhideSheets()

    '// = = = = = = = = = = = = = = = = = = =

    '// Select a sheet on each side of hidden sheets.

    '// Macro will unhide sheets between selected sheets.

    '// Dana DeLouis  Aug 2nd, 2008

    '// = = = = = = = = = = = = = = = = = = =

       Dim a As Long

       Dim b As Long

       Dim J As Long

       With ActiveWindow.SelectedSheets

          a = .item(1).Index + 1

          b = .item(2).Index - 1

          For J = a To b

             Sheets(J).Visible = True

          Next J

       End With

    End Sub

    Gord

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2014-05-30T00:45:12+00:00

    Hi- I could select the tabs to hide. The main issue is the "one at a time" tabs to unhide.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-05-29T16:14:24+00:00

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-05-29T15:05:55+00:00

    Can anyone help me determine if there is a macro to help me with hiding/unhiding tabs within a file? I have about 150 tabs and I only need to hide/unhide certain tabs. Right now, I have to hide/unhide one at a time. I have a macro that will allow me unhide all but that leaves me with the task of hiding all of the tabs that I do not need.

    Any help is greatly appreciated.

    Thanks!

    Hi,

    We need a rule(s), how do we know which worksheets to hide?

    Was this answer helpful?

    0 comments No comments