Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4595
  • Last Modified:

Excel 2007 :: object library invalid or contains references to object definitions that could not be found.

I am trying to use an excel Add-In (Wonderware Active Factory 9.2) and it doesn't work.

When I start EXCEL I always get the following message:

Compile Error:

object library invalid or contains references to object definitions that could not be found.

I've done quite a lot of searches here and in google and not found anything that could help me...

I've already tried to uninstall Office 2007 and install it back without any luck.. .always the same error.

I have the same thing running correctly on another computer, I've checked the References on both computers are the same and same DLL versions... I'm kind of desperate with this... I am convinced that If I fully reinstall the computer it will work... but it's a pain in the ass doing it because I ave a lot of stuff on this computer...

Is there any way to knwo WHICH object has the problem? That may help me to fix the thing...

Thanks in advance for the answers that are going to come :--)
0
liceran
Asked:
liceran
1 Solution
 
Brian WithunCommented:
1) You can remove all traces of the addin by first de-activating the addin, then going to the addins folder and removing the actual addin itself.

If the addin is named *.xla, then it was written in an earlier version of excel.  I think 2007 uses .XLAM

2) Once you have removed the addin, close and re-open excel.  Verify that the add-in is no longer appearing in the AddIn manager.

3) Next restart your computer (probably not necessary, but with MS it never hurts)

4) Start Excel again, make sure your error isn't still happening (in which case it's NOT the wonderware addin doing it)

5) Now close excel, put your addin back into the addins folder, and relaunch excel.

6) After excel launches, goto the addins manager and re-activate the addin.

7) Close and restart Excel.

Have your errors gone away as of #4 above, and re-appeared in #7?

If the errors still happen, I'm guessing that the add-in is referring to missing files.
Look at what addins exist and are activated on the 'addins' manager.

Make sure the non-working computer has the same addins installed and activated (such as the VBA Extensions for Analysis Toolpak if it's an older style *.xla addin)


0
 
liceranAuthor Commented:
bhwithun, thanks for your time... but this does nto address the issue.

The only Add-in activated is the one it's causing the problem (on both computers).

What you wrote here is something very basic, I already did few times...

Missing file?--- yep maybe... but the question is... Is there any way to know which object in the VBA code is causing the problem?...

Anybody else?
0
 
Brian WithunCommented:
I'm assuming your AddIn is password protected, in which case your debugging options are few.

Have you confirmed that the addin is not viewable?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
liceranAuthor Commented:
The add-in is not password protected, the code is viewable.

Trying to compile it I get the same error always, but it is not pointing to anything in particular.
0
 
Brian WithunCommented:
Press Alt-F11 to open the visual basic editor.

From there,

Debug > Compile VBAProject

If there is a compile error, you say it's not highlighting the offending line?

I've seen that happen occur if there is a syntax error in the structure of the code.  Excel cannot determine where the problem is because it can't make sense of what it's compiling.  Maybe a sub is being defined inside another sub due to an accidentally deleted "End Sub" statement...

What I've done to resolve it is to begin commenting out entire functions, sub, and other constructs.
Eventually you will comment out the part which has an error, and the compiler error will vanish.

Then you just need to inspect the last thing you commented out, looking for that elusive syntax error.


0
 
liceranAuthor Commented:
mmmmm.... This is not the way to go. The reason is VERY simple, the same Add-In is working on another computer... Just to be sure I directly copied the XLAM file... so, definitively  it is not what you are saying.
0
 
Brian WithunCommented:
Given:
It is working on the _other_ computer.
_This_ computer is missing something.

Find out what it is by discovering the line of code that calls the _missing_ thing.

You can go through the code line by line and verify the type of every variable, then track down the origin of the implementation of that type and you will eventually figure it it out.  This is the hard way.

Or _try_ commenting it out module by module.  Eliminate the code that IS working, and get to the code that ISN'T working.  This is the easiest way I know.

If you'll upload the addin I may be more directly helpful.  Other than that, all I can give you are debugging tips, which I have done.

Best of luck to you.


0
 
Rory ArchibaldCommented:
I assume this comes with an installation routine - did you run that, or did you simply copy the .xlam file from one machine to another (in which case any associated libraries would not be installed or registered properly)?
Regards,
Rory
0
 
AdvantageITCommented:
I had a really similar situation and this worked for me...

http://blogs.msdn.com/vsod/archive/2009/06/05/visual-basic-6-controls-stop-working-after-security-advisory-960715.aspx

I only had to do the stuff under the "On Client Computer" section. Dumped the .exd files, downloaded the cabs and then registered the ocx files.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now