Unknown/Undeletable VBA Microsoft Excel Object

scgilbert1

New Member
Joined
Nov 15, 2011
Messages
15
Hello,
I have a fairly large workbook that uses vba code to add and delete sheets. In reviewing the project explorer, I noticed a few "Sheets" without names (see the picture, sheet24 and sheet25 and there are a few others not seen here). The icon associated with them is similar to the "ThisWorkbook" object. The sheets in question do not have names associated with them.

I am trying to remove these as I believe they are potentially corrupted but I can figure out how.

When I right click, the "Remove Sheet" option is greyed out.
When I left click the object, the properties do update but it appears to be pulling the information from the "ThisWorkbook" object.
I've reviewed the front end pages and cannot see any unaccounted for tabs.
I've tried programmatically deleting without success using "Sheets(index).delete".
I've tried unhiding the sheet before deleting using "Sheets(index).xlsheetvisible" without success.

Any other ways to get rid of these short of attempting to copy all of the data to a new workbook and starting over? (the reason I don't want to do that is that I have a large number of internal connections and named ranges that I don't want to mess with quite yet."

Thank you!

Picture2.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
The 2 missing sheets have the same icon as ThisWorkbook, this normally signifies a workbook corruption.
In the thread below, Rory suggest the following:
If you start Excel in safe mode (hold down the Ctrl key while starting the application and answer Yes to the prompt), and then open the workbook, do you still see the same problem in the VBE? If so, I think you will have to rebuild.
 
Upvote 0
Solution
The 2 missing sheets have the same icon as ThisWorkbook, this normally signifies a workbook corruption.
In the thread below, Rory suggest the following:

Thank you! I tried to find that question but didn't search the right terms.

Off to rebuild...
 
Upvote 0

Forum statistics

Threads
1,224,884
Messages
6,181,568
Members
453,053
Latest member
Kiranm13

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top