Solved

Tab will not hide, can't delete

Posted on 2011-02-24
2
348 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

803 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