Sep 27, 2004 #1 walla07 Technical User Joined Mar 18, 2004 Messages 17 Location GB Is it possible to unhide more than one worksheet at a time? I've tried the obvious stuff like using Shift or Ctrl, but this doesn't work. Thanks
Is it possible to unhide more than one worksheet at a time? I've tried the obvious stuff like using Shift or Ctrl, but this doesn't work. Thanks
Sep 27, 2004 #2 KenWright Technical User Joined Mar 22, 2003 Messages 3,688 Location GB This will toggle all but the first sheet between Very Hidden and Visible. If you want them to be really invisible then change False to xlVeryHidden:- Sub HideandShowSheets() For i = 2 To Worksheets.Count If Sheets(i).Visible = True Then Sheets(i).Visible = False End If Next i End Sub or...... Sub HideandShowSheets() For i = 2 To Worksheets.Count If Sheets(i).Visible = True Then Sheets(i).Visible = xlVeryHidden End If Next i End Sub Regards Ken.............. ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission ---------------------------------------------------------------------------- Upvote 0 Downvote
This will toggle all but the first sheet between Very Hidden and Visible. If you want them to be really invisible then change False to xlVeryHidden:- Sub HideandShowSheets() For i = 2 To Worksheets.Count If Sheets(i).Visible = True Then Sheets(i).Visible = False End If Next i End Sub or...... Sub HideandShowSheets() For i = 2 To Worksheets.Count If Sheets(i).Visible = True Then Sheets(i).Visible = xlVeryHidden End If Next i End Sub Regards Ken.............. ---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission ----------------------------------------------------------------------------