Hide multiple worksheets
You can do it with a macro like the one below which goes through all the
worksheets in a workbook and asks if you want to hide it. Just one note you
cannot hide all worksheets in a workbook so if you try with this macro it
will throe an error.
Sub hideSheets()
Dim sSheetName As String
Dim sMessage As String
Dim Msgres As VbMsgBoxResult
For Each wsSheet In ActiveWorkbook.Worksheets
If wsSheet.Visible = True Then
sSheetName = wsSheet.Name
sMessage = "Hide the following sheet?" _
& vbNewLine & sSheetName
Msgres = MsgBox(sMessage, vbYesNo)
If Msgres = vbYes Then wsSheet.Visible = False
End If
Next wsSheet
End Sub
"Wanna Learn" wrote:
Hello If I select multiple sheets in a workbook then select hide it only
hides one worksheet , therefore I have to repeat the process several time .
Is thre an easier way ? thanks
|