Can't view sheets even after unhiding all sheets.....VeryHidden???

ghoshsaikat83
ghoshsaikat83 used Ask the Experts™
on
HI,

Someone has mailed me an excel file. In the file I can see that he has given rerefence to a number os sheets but I can't view them. I tried to unhide all sheets, but excel says that there are no hidden sheets. When I am looking at the VBA Project list, I can see a lot of sheets which are just not apprearing in the Sheet Tabs even though there aren't any hidden cells. In the vba project I can see that he has used the below mentioned code. The sheets mentioned in the code are the ones which I can't view. I wan't to how to do that and how to undo that.
Private Sub Workbook_Open()

Dim x As Date
Dim y As Date
x = Date
y = #2/23/2010#
If x >= y Then
Sheets("Master").Visible = xlVeryHidden

Sheets("TL Data").Visible = xlVeryHidden
Sheets("ES").Visible = xlVeryHidden
Sheets("Project").Visible = xlVeryHidden
Sheets("TS").Visible = xlVeryHidden
Sheets("TS Report").Visible = xlVeryHidden
Sheets("ES Report").Visible = xlVeryHidden
Sheets("Project Report").Visible = xlVeryHidden
Sheets("2COMS").Visible = xlVeryHidden
ActiveWorkbook.Save


Else

End If
End Sub

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2008
Commented:
Sheets can be hidden at two levels: hidden and very hidden. Hidden sheets can be unhidden by choosing the menu command Format->Sheet->Unhide, selecting the sheet to unhide from the list, and clicking OK. If that menu command is disabled then either there are no hidden sheets, there are hidden sheets but they are very hidden, or the workbook structure is protected. To unprotect the workbook structure, choose the menu command Tools->Protection->Unprotect Workbook. A password may be needed to complete the unprotection. Once unprotected try to unhide the hidden sheet again.

If the hidden sheet is very hidden, press ALT+F11 to open the VBE, press CTRL+R to open the Project Explorer window, locate and select the sheet to unhide in the list of project objects, press F4 to open the Properties window, locate the Visible property and change it to "-1 - xlSheetVisible". Press ALT+F11 to return to Excel.

Kevin

Author

Commented:
Kevin,

I always knew you are a lliving legend....but this was the first time I had the pleasure to raise a question which was solved by you....I don't have words to thank you.....YOU ARE GREAT. :)

Joydip (Big Fan of yours)

Author

Commented:
Just out of curiosity....What does the code do??? Does it automatically change the viewing status of those sheets based upon some date???

Joydip
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Top Expert 2008

Commented:
:-)

That wonderful comment was just added to my list of "fan mail":

http://www.experts-exchange.com/M_1677072.html

Kevin
Top Expert 2008

Commented:
>What does the code do??? Does it automatically change the viewing status of those sheets based upon some date???

Yes. If today (Date) is on or after 2/23/2010 then the sheets are hidden. Which is odd because today really isn't on or after 2/23/2010.

Kevin

Author

Commented:
Okay, Thanks a million for the solution and the explanation Kevin. May God bless you...

Joydip

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial