Results 1 to 7 of 7

Thread: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    2011-10
    Posts
    39
    Login to Give a bone
    0

    Default Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    Hey, a Windows update the other day seems to be causing this error in AutoCAD. I think it is only a problem with the 2007 version of Office products that were updated (two computer are having the problem in the office but had Office 2007 updated the rest are okay and had office 2010 updated). On one of those computers I was able to do a system restore to before the update and everything is now working, however the other didn't have a restore point to go back to. I tried uninstalling all the updates but it still isn't working so I assume it did something with VBA and the references AutoCAD is trying to use.

    The first image is what I get when I try to run basically any command (not just custom VBA but line gives the error, quit and so on). The second image is the error I get in the actual custom project (DrawingSettings is a custom form in the project that isn't recognized for some reason). The third image is all the references used by my project, all seem to be in the right place. Is there a way to determine which reference is causing the problem or if the problem is bigger than that?

    I've also uninstalled and re-installed AutoCAD Map 3D 2011 multiple times with no luck.

    Thanks for any help.AutoCAD Error.pngVBA Project Error.pngVBA References.png

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    I would reinstall the vba enabler for acad. There's been a long history of Office messing up vba if its installed after acad. Reinstalling acad won't fix it since the vba enabler is now separate.
    C:> ED WORKING....

  3. #3
    Member
    Join Date
    2011-10
    Posts
    39
    Login to Give a bone
    0

    Default Re: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    Thanks for the reply, sorry I should have mentioned that I did that multiple times as well. There were 3/~15 office updates that I for some reason I wasn't allowed to uninstall also.

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    A second look at the references shows that you have a reference to AutoCAD 2011 AND Map 3D 2005.
    C:> ED WORKING....

  5. #5
    Member
    Join Date
    2011-10
    Posts
    39
    Login to Give a bone
    0

    Default Re: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    The computers that received the update to 2010 version of office also had both these references and are still working okay (also the one that I did a system restore on has this reference is working). Is there anyway to completely remove VBA from my system and start over again from scratch by uninstalling office/autocad/vba enabler and re-installing? I did an uninstall of office and re-install of AutoCAD but it still had the problem. I could be wrong but my best guess is that one of these VBA libraries was compromised by the windows update and uninstalling doesn't remove it and therefore doesn't replace it with the old version when re-installed.

  6. #6
    Member
    Join Date
    2011-10
    Posts
    39
    Login to Give a bone
    0

    Default Re: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    I didn't actually re-install office the first time, I just did that now and it seems to be working. It must have replaced the problem file. Thanks for the help.

  7. #7
    Woo! Hoo! my 1st post
    Join Date
    2012-08
    Posts
    1
    Login to Give a bone
    0

    Default Re: Microsoft Visual Basic - Compile error in hidden module: ThisDrawing.

    Quote Originally Posted by Pwned555402908 View Post
    I didn't actually re-install office the first time, I just did that now and it seems to be working. It must have replaced the problem file. Thanks for the help.

    I solved my issue by following the advice found here:
    http://stackoverflow.com/questions/11971358/excel-​vba-automation-errors-due-to-office-service-pack-...

    For Windows 7 - remember to run cmd.exe "as administrator", and then:

    for 32bit Windows systems:
    regsvr32 -u c:\windows\system32\mscomctl.ocx
    regsvr32 c:\windows\system32\mscomctl.ocx

    for 64bit Windows systems:
    regsvr32 -u c:\windows\syswow64\mscomctl.ocx
    regsvr32 c:\windows\syswow64\mscomctl.ocx

Similar Threads

  1. Compile error in hidden module: Macros
    By john.buckerfield in forum AutoCAD General
    Replies: 9
    Last Post: 2012-07-12, 09:29 PM
  2. Microsoft Visual Basic Error
    By cluna784254 in forum AutoCAD Civil 3D - General
    Replies: 2
    Last Post: 2011-03-30, 01:32 PM
  3. Replies: 8
    Last Post: 2009-10-27, 12:03 PM
  4. Replies: 0
    Last Post: 2007-06-26, 01:49 PM
  5. Microsoft Visual Basic
    By jcronburg in forum VBA/COM Interop
    Replies: 1
    Last Post: 2004-06-16, 07:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •