hiding all sheets

bjr157

Board Regular
Joined
Mar 17, 2002
Messages
100
is there any command that hides all unhidin sheets in a workbook no matter how many sheets there are or whether there are any hidin sheets or not, thanks.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I'm not aware that you can hide ALL sheets
i've always been under the assumption that 1
sheet always had to be visible.

James
 
Upvote 0
James is correct, under normal xl circumstances, you must have 1 unhidden sheet. You can count the number of hidden sheets with vba like the following:

Code:
Sub test()
Dim ws As Worksheet
sheetcount = 0
For Each ws In ThisWorkbook.Worksheets
    If ws.Visible = False Then
        sheetcount = sheetcount + 1
    End If
Next ws
MsgBox ("You have " & sheetcount & " Hidden Sheet[s]")
End Sub

This could very easily be turned into a user-defined-function. Hope this helps.

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue">O</font></font></font>
wave.gif

This message was edited by NateO on 2002-05-06 16:00
 
Upvote 0
Hi bjr157,

Alt-F11>click on> Microsoft Excel Objects>
click on the sheet(s) you want to hide>In the
properties window>scroll down to visible and
choose xlSheetHidden or xlSheetVeryHidden

Don't worry about the commedians comments
either, the purpose of this board is to help one another and share knowledge, but some people like to us it to practice their stand up comedy routine

James

_________________
This message was edited by James on 2002-05-06 16:58
 
Upvote 0

Forum statistics

Threads
1,213,514
Messages
6,114,078
Members
448,547
Latest member
arndtea

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top