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


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


End If
End Sub

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zorvek (Kevin Jones)ConsultantCommented:
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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ghoshsaikat83Author Commented:

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)
ghoshsaikat83Author Commented:
Just out of curiosity....What does the code do??? Does it automatically change the viewing status of those sheets based upon some date???

CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

zorvek (Kevin Jones)ConsultantCommented:

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

zorvek (Kevin Jones)ConsultantCommented:
>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.

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

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.