Solved

Tab will not hide, can't delete

Posted on 2011-02-24
2
350 Views
Last Modified: 2012-06-27
Hello - we have a old template, developed by someone who is no longer here, that has 16 tabs, one of which does not appear on the spreadsheet, even after doing a Format > Worksheet > Unhide.

The code module for it shows up as a node on the "Excel Objects" in Project Explorer, but even in VBA, ActiveWorkSheet.Delete fails with "Select method of worksheet class failed"
(we wrote a short macro that does a WorkBook.Unprotect, then .Select and .Delete that particular worksheet)

The only way we knew this tab existed was that another macro that is involved in this process blows up when it loops through the workbook to un-hide all the worksheets.  

Anybody seen this before? How do you go about deleting a phantom worksheet?

Thanks
0
Comment
Question by:mlagrange
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 34973378
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
0
 

Author Comment

by:mlagrange
ID: 34973526
Worked like a charm - Thanks!

(VERY Hidden... sounds like Animal House's  "Double Secret Probation"... sheesh...)

Thanks again
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question