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!​
 

Some videos you may like

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
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?
 

Trebor76

Well-known Member
Joined
Jul 23, 2007
Messages
4,587
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
 

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
794
I have a similar issue my error is the following 'compile error in hidden module' not sure were to go to fix this
 

Bambidear

New Member
Joined
Apr 18, 2012
Messages
2
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
 

paulleahy

New Member
Joined
Aug 30, 2013
Messages
1
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.
 

Justaboo

New Member
Joined
Feb 12, 2014
Messages
1
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
 

Watch MrExcel Video

Forum statistics

Threads
1,095,269
Messages
5,443,453
Members
405,237
Latest member
rezaria

This Week's Hot Topics

Top