'Broken workbook, VBE shows every worksheet twice with weird symbol

When I open a specific workbook, I receive a few VBA errors ("Automation error", "Compile error: Method or data member not found"). I opened the Visual Basic Editor and found that in the document tree under "Microsoft Excel Objects" every single worksheet suddenly appears twice: Once with the regular icon for a worksheet and a second time with a weird blue icon that I've never seen before: Screenshot The entries with the weird icon show the "CodeName" I had specified for the worksheets but do not show any worksheet name, wile the entries with the regular icons show the "CodeName" followed by a "1" and the correct worksheet name.

This has now already happened the second time to me, both times with the same workbook. The first time (maybe two months ago), I've just deleted the file and continued with a backup from the day before. I will probably do the same this time, but would like to understand the issue.

What did I do? The file was alright when I opened it the last time. I have then added some data, modified a UserForm and added some VBA code (nothing special). The workbook had initially been created on a computer with German Excel, the latest change took place on an English system (but this process works fine with other workbooks). I found this link where another user described the same issue 6 years ago: https://superuser.com/questions/1005482/excel-creates-non-existent-worksheets-in-vba-project-explorer However, the suggested solutions do not work for me. Nothing changes when I save the file as *.xlsb. When I save it as *.xlsx, the entires with the blue icons disappear but the entries with the regular icons remain with the invalid "CodeName", breaking some of my macros.

Did anyone experience the same issue before? Any ideas what might went wrong?

Thanks a lot!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source