By: Yousuf Khan

In reply to Michael.

Hi MICHAEL,

The errors you’ve mentioned could indicate that the workbook is either very hidden or corrupted. There are two levels of worksheet hiding: hidden and very hidden. From a user’s perspective, the difference is that a very hidden sheet cannot be made visible through the Excel user interface, and the only way to unhide it is with VBA.

Since you’ve used VBA to work with the worksheets and they still appear hidden, you can try a different VBA code to check if they’re very hidden and unhide them. Here’s the VBA code to unhide all very hidden sheets:

Sub UnhideVeryHiddenSheets()
Dim wks As Worksheet
For Each wks In Worksheets
If wks.Visible = xlSheetVeryHidden Then wks.Visible = xlSheetVisible
Next
End Sub

Note: This code only works for very hidden sheets, not worksheets that are hidden normally. If you want to display all hidden sheets, use the code below.

Sub UnhideAllSheets()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
wks.Visible = xlSheetVisible
Next wks
End Sub

Give it a try and let me know if it works.

Best Regards,
Yousuf Khan