How to unhide sheets in Excel 2010

I know this sounds like a super basic question, but for the life of me I cannot figure out where 2 out of 6 of my sheets are within my workbook. Normally I can right-click the tabs and unhide, but Excel is telling me there is nothing to unhide. Meanwhile, the worksheets.count function in VBA is telling me that there are 6 sheets in the file, even though I can only see 4 sheets. The file has no password protection. If worksheets(1).activate is run, then all the tabs that I can see are suddenly unselected. Where could those 2 secret sheets possible be?
shampouyaAsked:
Who is Participating?
 
Saurabh Singh TeotiaCommented:
Those 2 worksheets if you see in the Visual basic editor which is in ALT+F11 in view you will find these worksheets..Now what has happened is the property of these 2 worksheets are set to

xlsheetveryhidden

Now whenever you set the worksheets to be very hidden they can't be unhidden from the excel workbook and they need to be unhidden from the visual basis only...In order to do that press f4 on your desired sheet in visual basic editor and change the properties from xlveryhidden to xlvisible which will do what you are looking for...

Enclosed is the screenshot for your reference...

Hidden
Also in order to unhide all the worksheets you can use the following code...

Sub unhide()

    Dim ws As Worksheet

    For Each ws In ActiveWorkbook.Worksheets
        ws.Visible = xlSheetVisible

    Next ws
End Sub

Open in new window


Saurabh...
0
 
JohnBusiness Consultant (Owner)Commented:
Right click on one sheet and Select All Sheets. Then scroll the sheets from left to right and right to left (are they scrolled off the sheet bar?)
0
 
shampouyaAuthor Commented:
No luck, the sheet names are rather short, so scrolling isn't crowding any of them out of view.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
JohnBusiness Consultant (Owner)Commented:
I really do not know why you can only see 4 sheets if there are 6 there and none hidden.

What happens if you try to move the sheets around (re-order them). Is one hidden underneath?
0
 
shampouyaAuthor Commented:
No luck there either; those first 2 sheets are still not visible. Sheets(3).activate works fine though.
0
 
JohnBusiness Consultant (Owner)Commented:
Another thing you might try is to copy the workbook to a USB key, take it to a different computer and try on the different computer.
0
 
jmcgOwnerCommented:
Just throwing out a guess here, but after Select All Sheets can you then do an Unhide?
0
 
Saqib Husain, SyedEngineerCommented:
Try

sheets(1).Visible=xlSheetVisible

for each of the sheets
0
 
shampouyaAuthor Commented:
great answers, thanks guys
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.