AutoCAD 2010/2011/2012

Reply
New Member
aunna
Posts: 2
Registered: ‎04-23-2012
Message 1 of 12 (836 Views)

CAD VBA shows msg "Object library invalid...."

836 Views, 11 Replies
04-23-2012 02:35 AM

When I try to use "vbaman" command to load a project, it shows error msg "Object library invalid or contains references to object definitions that could not be found."

What does this mean? and How can I fix it ?

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 2 of 12 (835 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-23-2012 02:38 AM in reply to: aunna

Hi,

 

you have references to libraries the VBA-module can't find on your current system.

Start therefor VBAIDE with your project, then you should find a pulldown-menu called "Tools" (or "Extras"?) and within that you'll find "References" ==> go into this and the dialog shows you then what you have referenced but could not be found.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
brianaubert
Posts: 38
Registered: ‎03-22-2005
Message 3 of 12 (740 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 06:56 AM in reply to: aunna

Hi,

 

I've encountered the same problem.

 

What I've found in my research is this was caused by the security updates from Microsoft for April 2012. Specifically "MS12-027" which is an update to the Windows Common Controls.

 

I'm still looking for a way to fix the problem on 2 workstations that have the update installed and now my custom VBA applications won't run.

 

Has anyone else had this problem?

 

Brian

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 4 of 12 (737 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 07:08 AM in reply to: brianaubert

Hi,

 

what libs have these VBA-macros referenced? And if you have forms used, what controls do these forms contain?

 

What may be a hint (e.g. from >>>this page<<<, but also some others) is that MSCOMCTL.OCX and/or MSCOMCT2.OCX lost there registry-entries.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
brianaubert
Posts: 38
Registered: ‎03-22-2005
Message 5 of 12 (732 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 08:17 AM in reply to: Alfred.NESWADBA

Hi Alfred,

 

Thank you for the quick reply.

 

Yes I do use the Windows Common Controls 6.0 and the following References;

Visual Basic for Applications

Microsoft Forms 2.0 Object Library

Microsoft Scripting Runtime

AutoCAD 2012 Type Library

 

Thank you for the link to the other Forum regarding this issue. I'll go and read that in detail.

 

Brian

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 6 of 12 (729 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 08:26 AM in reply to: brianaubert

Hi,

 

>> Yes I do use the Windows Common Controls 6.0

That would be my first try: uninstall and reinstall them as with the installation the entries to the registry (and registring as COM-components) are done well.

 

Good luck, - alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
brianaubert
Posts: 38
Registered: ‎03-22-2005
Message 7 of 12 (727 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 08:55 AM in reply to: Alfred.NESWADBA

How do I go about un-installing and re-installing the Common Controls? I've never had to do that in the past.

 

Thanks,

Brian

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 8 of 12 (725 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 08:57 AM in reply to: brianaubert

Hi,

 

try >>>that<<<

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Active Contributor
brianaubert
Posts: 38
Registered: ‎03-22-2005
Message 9 of 12 (724 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 09:33 AM in reply to: aunna

Alfred,

 

Sorry to say the fresh install of the VBA 6.0 Runtime didn't fix the problem. I'm still getting the same error message on the test maching.

 

Brian

*Expert Elite*
Alfred.NESWADBA
Posts: 8,880
Registered: ‎06-29-2007
Message 10 of 12 (721 Views)

Re: CAD VBA shows msg "Object library invalid...."

04-30-2012 09:45 AM in reply to: brianaubert

Hi,

 

did you find the two files MSCOMCTL.OCX and MSCOMCT2.OCX on your  pc? Have you tried to register them usign regsvr32?

 

Another option may be to start e.g. Excel and try to create the same references in a new VBA-project + set a few control onto a temporary form-object.

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube