Q: Why am I getting error message upon opening and closing Excel?

I downloaded Office 2010 (Home/Student); and am using Windows 7.  Every time I open Excel I get 'Microsoft Visual Basic for Application' dialog box that says "Compile error in hidden module: AutoExecNew. this error commonly occurs when code is incompatible with the version, platform or architrcture of this application.  Click Help for information on how to correct this error."  Can't find remedy in help.  Also, when I try to close the application, I get a different dialog box- "Compile error in hidden module: DistMon."  Then the dialog box continues with the same explanation and refers me to help menu.



What it boils down to is that you have a macro in the "AutoExecNew" function that no longer works as is in 2010. Now you just have to find, WHERE this bad code is hidden. The following tip is for Word, but Excel follows much the same model. So if you can work your way through you might find the specifice cause of the problem:

Hierarchy that controls conflicts - Order of Precedence

Word has a hierarchy that controls conflicts in keyboard shortcuts (& other conflicts such as identically named macros). It could be that a shorcut with a higher priority takes over. In addition, I have found that sometimes you think you are changing the keyboard shortcut only for one template, but it gets changed in as well.

The definition or setting that takes precedence is the one that resides closest to the document. Therefore, Word resolves such conflicts in the following order of priority:

1.Document itself

2.Template attached to the active document

3.Normal template

4.Additional global templates (in startup folder) in alphabetical order

5.Add­ins in alphabetical order

6.Application layer (Word)

The application layer inclurepdes ANY default shortcut. It only resides in one of the other layers when you specifically assign it there!

If several global templates have conflicting settings, Word resolves the conflicts in the order in which the templates are listed in the Templates and Add­Ins dialog box (Tools menu).  Templates in the Word Startup folder appear at the top of the list and have a higher priority. Subsequent ranking on the list is determined by alphabetic order.

Note about the Application layer: You can open a global template, go into the Customize dialog box, & change, say, Ctrl+F4 from DocClose to AllCaps, & save the change in  However, the change WILL affect new documents based on the normal template, despite the fact that you saved your changes only to If you now look at the assignment of keys in the normal template, it shows that Ctrl+F4 was changed in the normal template. Yet, when you exit Word, you do not get a prompt to save, despite having Tools/Options/Save set to prompt for changes.

The reason for this is that all default shortcuts are in the application layer. The default assignment (Ctrl+N = FileNew) is the “application layer”, and has the lowest priority. No matter whether you change the shortcut in the document, the attached template,, or a global template, the customized shortcut will take precedence. But if you assign the same shortcut differently in the document, the attached template,, and a global template, you’ll see that the latter have lower priority.

You can read more at - Office 2003 Editions Resource kit Tools

Phil Rabichow


Again, the following tip is specific to a different edition of Word, but you can adapt the troubleshooting process to Excel too:

How to troubleshoot problems that occur when you start or use Word 2010, Word 2007, Word 2003, or Word 2002 (no %temp% folder)




If you are reading this tip and it helps you, please click on the  "Vote as Helpful" button to "reward" me with "points"! Thanks 

Please click on  Propose as Answer  to let others know the solution that worked for you

Link to: Silverlight Applets Mapping 2003 Menu to 2010 Ribbon for all Office Apps

Link to: Search for 2007 Commands addin PS: MS WHERE IS THE 2010 VERSION!?!?! HintHint!

Link to: Flash Applets Mapping 2003 Menu to 2007 Ribbon for all Office Apps

****** ****** ******** ******** ******* ******* ******

When things are bad, you can either:
- cuss,
- cry or
- laugh ...

Why not choose to laugh

Did this solve your problem?

Sorry this didn't help.



On Tue, 15 Feb 2011 04:55:04 +0000, Newby1234 wrote:

Compile error in hidden module: AutoExecNew

Some troubleshooting:


Did this solve your problem?

Sorry this didn't help.

Question Info

Views: 3,926 Last updated: March 17, 2018 Applies to: