Compile error in hidden module: AutoExec -- Help please RRS feed

  • Question

  • Anytime I access a microsoft office program such as word or outlook, this visual basic error pops up.

    "Compile error in hidden module: AutoExec"

    It gives two options:  "Ok" or "Help"
    - When I click Ok, I can continue to use the program
    - "Help" gives the following description:

    "Compile error in hidden module: <module name>

    A protected module can't be displayed. This error has the following cause and solution:

    • There is a compilation error in the code of the specified module, but it can't be displayed because the project is protected.

      Unprotect the project, and then run the code again to view the error.

    For additional information, select the item in question and press F1(in Windows) or HELP (on the Macintosh)."

    How do I unprotect the project?

    Any help would be greatly appreciated

    Wednesday, November 23, 2005 1:08 AM


All replies

  • I am experiencing the same issue. Please advise!
    Sunday, December 4, 2005 1:23 PM
  • 1. What's your referance pointing to?
    2. How are you creating a instance of the object from the office app?
    3. What specifically are you doing with the object?

    I'm seeing failure to create the object here, but as you say, you can click OK and continue, does it then do what you intended?

    Tuesday, December 6, 2005 11:19 PM
  • I'm not trying to create anything. I get the error when exiting Office 2003 applications, primarily Word or Outlook.

    I'm not familiar with VB programming, so I don't know how to repair or disable this module.
    Wednesday, December 7, 2005 12:37 AM
  • Okay now we are talking a totally different scenerio here.

    First off, even though it says VB, it's not Visual Basic like Visual Basic dot net or even VB 6. It's actually VBA running under office. unless of' course you can provide any more information that's what I'm seeing.

    Modules under office apps are stored in the files that the office app uses. This is probablly running while your using office. Projects are protected as the source file containing the module is the only one that can open them.  Since both word and outlook both resource Word the file is probably going to be in the start up directory for Word. In word click the tools menu --> then Templates and Addins. A list of loaded items should appear. See if that AutoExec isn't listed.

    This could be one of two things. Something that was added as part of an application install to add functionality to word Or it's could be malicous code (Macro Virus) that came into your computer via a word document or even an e-mail.

    Ultimately it isn't a Visual basic issue. It's a Word issue. You May also want to check your Normal.Dot template file to see if the module wasn't added directly to it.

    You can suspend all macro code by changing your security settings. Tools--> Macro-->Security. You can view projects via Tools-->Macro--> Visual Basic Editor.

    Wednesday, December 7, 2005 6:26 PM
  • Its still not clear how to fix this. I have the same problem
    Friday, December 23, 2005 1:03 AM
  • It is occurring in other Office 2003 applications also. It doesn't seem to be affecting any functionality at all. If there were just a way to turn off the messages, that would make me totally content.


    Friday, December 23, 2005 1:55 PM
  • I have the same problem, whenever opening or exiting Outlook.  Randy's answer either doesn't resolve the issue, or I don't understand the answer.

    These 2 error messages (Compile error; Visual Basic,   separate msg on sign off says Auto Exit is not found or something) began about the time I was synching my Treo 650, and the Treo stopped working.  It had successfully syched for 1 month previously.  I have had the Treo repaired but Outlook now refuses to synch while displaying the error messages.

    One techie opined that my Outlook file is corrupted, needs reinstall.  Dell won't send the disk, and MS website says Outlook 2003 download without disk is possible (fullfile-enu.exe) but will not install and asks for disk.  I have the MS XP Pro but it wants to wipe my whole system and cannot simply install Outlook.  What am I missing here?

    I'm tired of closing these boxes, and want Outlook to synch again.

    Please help.

    Wednesday, December 28, 2005 10:24 PM
  • Thursday, December 29, 2005 1:26 AM
  • It worked! fixed my problem!

    Thanks so very much!!!

    Friday, December 30, 2005 9:57 AM
  • Just curious... Those getting the error message, are you running Windows 64-bit version? I am and get the error...

    Please confirm, I will contact Microsoft and see if they have a known issue/resolution...

    Joe Jeffcoat



    Sunday, February 19, 2006 3:43 PM
  • I'm glad that worked for you, it didn't for me considering I had just updated Adobe when the problem surfaced.

    Moving the files as instructed by Microsoft only caused the PDFMaker buttons to disappear in my programs.

    So, I ended up just opening Adobe and running "Detect & Repair..."

    That fixed everything.

    Hope this helps anyone with a similar problem.

    Friday, March 3, 2006 3:40 PM
  • thanks for the info it works for me too.

    Monday, February 4, 2008 7:54 PM
  •      Just want to say awesome post.  I followed the path to c:\program files\Microsoft Office\Office 11\Startup and there I found my two corrupt templates that were loading up with Word 2003 (basic edition) everytime I started the program.  It was also creating the "Compile error in hidden module: autoexec" message when I closed my Outlook 2003 (basic edition).  I found the templates in the folder and also found some hidden ~$ template files.  Ususally when you see these hidden files with the normal file it means the file did not close properly.  It's hanging there in limbo.  Thats what makes the error pop up I think.  Once I deleted the Word Template files and all the hidden files as well the error went away.  Microsoft Office works normally again in my Dell Dimension WinXP Pro machine.  Thanks for the great post.  Could not have done it without it. 

    Btw...if you have an older version of Office you may be looking for the "Office 10" folder.  If you have a more current version you may want to look in Office 12 or Office 13.  Cheers and I hope this helps someone.

    Sunday, July 22, 2012 4:17 AM