PDA

View Full Version : Solved: Mystery Sheet. Not Hidden, but I only can see it in VB Editor



frank_m
03-08-2011, 02:11 AM
My workbook has a sheet that is apparently "sheet 10" that I cannot see by normal means.
I am nearly sure that is not Hidden or very hidden, but I can only see it in the VB Editor objects, and I do not see any obvious way to delete it.

It did have some command button code in it that I deleted. Is there way that I can get rid of it?

See sample workbook attached

Thank you in advance

Bob Phillips
03-08-2011, 02:30 AM
What have you done Frank? It is a Workbook object, ThisWorkbook. I would copy the real sheet to a new workbook, copy the code over, and ditch this one.

frank_m
03-08-2011, 02:57 AM
HI Bob,

Yeah I thought that might be the only answer. Easy enough to move all the valid sheets over to a new workbook in this case. I do though have a very large workbook with the same thing, but moving 20 (packed full of code) standard modules and 10 sheets, isn't going to kill me.

I have no idea how it happened.. -- A clue might be in the fact I've been using a certain workbook as a template for others for about the last 12 to 15 years. Likely the very first version of the workbook may have been created in Excel 97, before the Thisworkbook module object was invented, then the mutation may have occurred in Excel 2000, or the transition to. -- I've since replaced all sheets and all standard modules, but never realized that one was there.

Very strange mutation huh?. At first glance it looked like it had at one time been a sheet class module because it had some sheet command buttons and a lot of button code. --- I see what you're saying though, that it is a (2nd)ThisWorkbook module, because when I click the general drop down, Workbook is on the list and if I click that it adds Private Sub Workbook_Open()

Oh well, at least I finally noticed it. Who knows what headaches it may have already cause me, or might have in the future.

Thanks for checking it out for me.