VBA by itself renaming "ThisWorkbook" as one of the codesheet's name?

Muir2014

New Member
Joined
Feb 20, 2014
Messages
22
For some reason Excel VBA is renaming ThisWorkbook as one of the CodeSheets' name contained within the workbook :

I'm having a hiccup that I haven't find the solution, originally one of the CodeSheet name was --> "ShMC", then VBA changed it to ShMC1 and the "ThisWorkbooK" was renamed as "ShMC".
There are no events in this sheet other than "clicks" events, none of then are named as "ShMC", and no procedure is named as "ShMC".

I have a copy of the workbook, and don't know if at sometime I had both workbooks opened at the same time, and maybe this is the cause.

I need guidance in this matter, and thanks in advanced.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I have been through this many times and have to fix it many times. The real problem is that the sheet is on the New codename and the VBA code is on the Thisworkbook version

Let me find a link to where I posted the Solution
 
Upvote 0
The problem seems to come back it the file remains as .xslm. I have taken a huge amount of time trying to figure out what causes it. I originally thought it was Excel Tables. I think it is very complex and large sheets.

*.xlsb files don't get the problem
 
Upvote 0
The problem seems to come back it the file remains as .xslm. I have taken a huge amount of time trying to figure out what causes it. I originally thought it was Excel Tables. I think it is very complex and large sheets.

*.xlsb files don't get the problem
Hi Jeffrey, I had this problem in the past and I couldn't remember what did I do about it, I just remember I never found the cause, I think I did what you suggested as saving as xlsx, then as xlsm, I'll try that again, thanks a bunch!!
 
Upvote 0
Hi,
I open this thread again as I ran into the same issue.
It happened twice this week, when I open the workbook, the module ThisWorkbook get renamed with the first worksheet and the worksheet get renamed as "A000Lancement" --> "A000Lancement1".
There is nothing in the Workbook_Open event that could do that.
If I close the workbook without save, and open it again the problem doesn't occurs, I can't find a way to reproduce it.

I highly suspect a Microsoft Excel bug at the opening of the workbook.

I want to know if anyone found the reason of this issue ?
 
Upvote 0
I have had great success keeping them as .XLSB. The only drawback I can see is if you want to edit the UI for custom menus. Then you would have to temporarily save it as .XLSM, make the changes, and then save again as .XLSB

Haven't seen a solution yet
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,324
Members
453,032
Latest member
Pauh

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