Missing Sheets

P

pgarcia

Ok, I got this spreed sheet from a coworker who is no longer here. Now, look
at the spreed sheet, I see 4 tabs and found another 2 hiden. But the VB code
shows 13 sheets. Where are the other sheets?
 
C

Chip Pearson

Sheet visibility can have on of three values: Visible, Hidden, and Very
Hidden. A sheet that is Very Hidden will not display in the list of hidden
sheets and cannot be made visible via any built-in Excel menu item or
command button. It can be made visible only via VBA code. Try something
like

Sub ShowVeryHidden()

Dim WS As Worksheet
For Each WS In ActiveWorkbook.Worksheets
If WS.Visible = xlSheetVeryHidden Then
WS.Visible = xlSheetVisible
End If
Next WS

End Sub

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
W

ward376

Open the VBA editor (shift f11) and look in the project explorer -
every sheet will be listed. Select a sheet that isn't visible in the
Excel interface and hit f4 to display it's properties (if they aren't
already visible) and change that sheet's visible property to -1 -
xlsheetvisible and then you should be able to see it in Excel.
 
J

Jim Thomlinson

Sheets have 3 possible visible states. Visible, Hidden and VeryHidden. I am
guessing that the sheets in question are very hidden. Try running this code

dim wks as worksheet
for each wks in worksheets
wks.Visible = xlSheetVisible
next wks

Very hidden sheets can only be unhidden via code...
 
P

pgarcia

That was cool, Thank!!

Hay, If you don't mind, I have another question that no one as anwered yet.
Can you do a look up of pgarcia and it's the one that has no anwers. Thanks
 
P

pgarcia

Sorry, but when I save and close the worksheet, and re-open it, all the
passwords are in place again. Do you know what the VB code it that is doing
this?
 
C

Chip Pearson

It sounds like there is a macro named Auto_Open in a module or a
Workbook_Open event in the ThisWorkbook module that is hiding the sheets.
Try closing the workbook and then re-open it while holding down the SHIFT
key. This will prevent startup code from running. If the sheets remain
visible, then an Open procedure is hiding your sheets.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top