ThisWorkbook1-3 in "Microsoft Excel Objects" in VBA

Jorgen

Board Regular
Joined
Mar 25, 2004
Messages
67
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
I got an excelfile back from a user, and it behaved strange. Among other things, the
" ChDir ThisWorkbook.Path" didn't work. After some looking I found that in the VBA, the "Microsoft Excel Objects" contained "ThisDocument" which is normal, but it also contained "ThisDocument1", "ThisDocument2" and "ThisDocument3" which I have never seen before.

And they weren't possible to remove. This is not an urgent issue since I can copy the changes into a working book, but it would be interesting to know for the future...

Thanks,
Jörgen
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I have heard of this before on rare occasions, seemingly following a crash in Excel or import/export of a workbook by OpenOffice, but I've never heard of a solution other than copying all the sheets to a new workbook or saving as an Excel 5/95 workbook (though you may lose functionality that way). I can only assume the file format has become corrupted in some way.
Note: I assume you did mean that the Thisworkbook1, 2 and 3 did appear under Excel Objects, not under class modules.
 
Upvote 0
Yes, they were under "Excel Objects".

Thanks for the answer, Rorya. At least there wasn't an obvious faster way than the route I took by copying the changes :)

//Jörgen
 
Upvote 0
Re: ThisWorkbook1-3 in "Microsoft Excel Objects" in VBA - solved

If anyone else has the same problem:

I actually found a way to get my Workbook cleaned up and working. I downloaded the (14-day trial version) of the "Excel Rebuilder" from
http://www.vbusers.com/commercial/Rebuild.asp

After the installation it took less than a minute to rebuild the workbook, and the "garbage" VBA-sheets were all gone while retaining all the functionality of the workbook. So it feels safer than the "save to Excel 95"-method, since that kills any camera-pictures, drop-down-lists and some other stuff.
//Jörgen
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,739
Members
449,050
Latest member
excelknuckles

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