Compile Error in Hidden Module: ThisWorkbook

Bambidear

New Member
Joined
Apr 18, 2012
Messages
2
Recently noticed every time I open Excel (2007) this error block showing up .
I've hit through all the threads I could find, ripped up my manuals and everything else I could think of to locate why this is happening. I hate to admit that I am not keen with VB so cannot understand why this would appear.​

Suggestions please? Am desperate to get this sorted out. TIA!​
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Hi and Welcome to the Board,

I haven't seen that before, but I'd suggest you start by checking in the ThisWorkBook Code Module to see if there is any code there.

You can get to it with these steps...
Alt-F11 to Open VB Editor
Ctrl-R to Open the Project Explorer Pane if it is not already open
Find the Icon in the tree structure under Book1 labeled "This WorkBook" and Double-Click it.

If you're experiencing this upon opening a new Excel session, then there might be a problem with the template workbook you're using for new workbooks, or in Personal.xlsb.

Do you experience this same problem when Excel is closed and you Open an existing workbook (from another user) by double-clicking on it?
 
Upvote 0
Hi Bambidear,

Welcome to MrExcel!!

That error message is generally due to some visual basic reference(s) erring out because they are no longer located in the same directory they once were. This happens either because there's been an upgrade or the file was used and saved in a different version of Excel by another user.

See is these four steps fix the issue:

1. From the file in question open the Visual Basic Editor (Alt + F11)
2. From the Tools menu select References
3. Scroll through the references within the Available References listbox and untick any onces that start with MISSING and if required, reselect them
4. Ater all the erroneous references have been removed, return to Excel (Alt + Q)

HTH

Robert
 
Upvote 0
I have a similar issue my error is the following 'compile error in hidden module' not sure were to go to fix this
 
Upvote 0
Hi Bambidear,

Welcome to MrExcel!!

That error message is generally due to some visual basic reference(s) erring out because they are no longer located in the same directory they once were. This happens either because there's been an upgrade or the file was used and saved in a different version of Excel by another user.

See is these four steps fix the issue:

1. From the file in question open the Visual Basic Editor (Alt + F11)
2. From the Tools menu select References
3. Scroll through the references within the Available References listbox and untick any onces that start with MISSING and if required, reselect them
4. Ater all the erroneous references have been removed, return to Excel (Alt + Q)

HTH

Robert

Open for more suggestions as that one failed me :( I appreciate the efforts though! TY
 
Upvote 0
Open for more suggestions as that one failed me :( I appreciate the efforts though! TY

This can be a red herring. If you have say, an older version of a macro and open it in a new version any method / function that does not have an origin will cause this exception as excel goes off looking for a definition.

Common causes are things like str() len() rtrim() ...etc, these used to be considered system functions so no need to qualify them.

Thankfully the fix is easy as eating cake, add "VBA." before any of these functions. eg: len() becomes VBA.len and so on.

Hope this helps.
 
Upvote 0
Thank you Robert your solution worked beautifully!

Hi Bambidear,

Welcome to MrExcel!!

That error message is generally due to some visual basic reference(s) erring out because they are no longer located in the same directory they once were. This happens either because there's been an upgrade or the file was used and saved in a different version of Excel by another user.

See is these four steps fix the issue:

1. From the file in question open the Visual Basic Editor (Alt + F11)
2. From the Tools menu select References
3. Scroll through the references within the Available References listbox and untick any onces that start with MISSING and if required, reselect them
4. Ater all the erroneous references have been removed, return to Excel (Alt + Q)

HTH

Robert
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

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