SOLVED

Unhide Sheets: Can't unhide a xlSheetHidden

Brass Contributor

Hello! I have a workbook that was password protected (by me), I unprotected and now I cannot see my additional tabs. When I go to 'View Code' the tabs are there but unable to unhide. 

 

They are not VERYHidden, so I don't know what the issue is. This level of excel is also new to me. 

 

kittenmeants_0-1714653973549.png

If I change xlSheetHidden to xlSheetVisible I get an error:

kittenmeants_1-1714654117717.png

I tried code:

Sub UnhideTab() ActiveWindow.DisplayWorkbookTabs = True End Sub

 

Still nothing - again, not super comfortable with the code side so I might be doing something wrong, but it seemed pretty straight forward when I did a google walk-through. 

 

I have 2 tabs that I need to unhide, the others are visible. Thank you!

 

9 Replies

@kittenmeants 

 

Have you tried:

 

Sub UnhideSheet()

Worksheets("Yourworksheetnamehere").Visible = True

End Sub

 

Still get an error when I run: 

kittenmeants_0-1714655863751.png

 

@MAngosto 

@kittenmeants 

 

You need to change "Yourworksheetnamehere" with the actual worksheet name that you desire to unhide. If your hidden worksheet is named "Hello", you should write in the piece of code that I gave you:

 

Worksheets("Hello").Visible = True

Thank you for explaining :facepalm:, gave me a good laughing learning moment. 

 

Still getting an error, but different:

kittenmeants_0-1714656471220.png

 

@MAngosto 

@kittenmeants 

 

Where are you writing the VBA Code? Try writing it on "ThisWorkbook" space:

 

MAngosto_0-1714657397512.png

 

Another question; If you sheet is not VERYHidden as you stated, why would you not be able to right-click on any visible sheet and then click on the option "Unhide"?

@MAngosto 

 

Just a quick walkthrough to make sure I am not missing something simple:

If I right click to unhide tabs, only 2 appear. There are 4 tabs total. 

kittenmeants_0-1714657587258.png

 

If I go to 'View Code', I can see my tabs/sheets for this workbook. The tab I am trying to unhide shows as "0-xlSheetHidden"

kittenmeants_1-1714657766727.png

 

If I double click on "This Workbook", and enter the code, press Run, I still get an error.

kittenmeants_2-1714658072824.png

kittenmeants_3-1714658094601.png

 

 

 

best response confirmed by kittenmeants (Brass Contributor)
Solution

@kittenmeants 

 

One last question: Are you sure you have unprotected the workbook? This is what may be causing the issue.

Yep, that was it. I was working between two similar workbooks and unhid one and not the other. Thank you so much for your help! I'm going to crawl in a hole now. haha....
But really, thank you so much. I really appreciate it.

@kittenmeants 

 

Glad it finally worked! At least we had a little fun for a moment! ;)

1 best response

Accepted Solutions
best response confirmed by kittenmeants (Brass Contributor)
Solution

@kittenmeants 

 

One last question: Are you sure you have unprotected the workbook? This is what may be causing the issue.

View solution in original post