Upgrading to 2007 - Object library invalid


B

Beans

Hi,

I have just upgraded to Vista and Office 2007 and when I loaded my add-in it
seemed to work OK.

To solve some problems with Outlook I was forced to uninstall and reinstall
Office. No my add-in gives me an error that states "Object library invalid
or contains referenced to object definitions that could not be found".

How do I find out what object libraries I need to load?

Below if the shortest of the macros that give me the error.

Sub DeleteMyMenu()
Dim MU As CommandBarPopup
On Error Resume Next
Set MU = Application.CommandBars(1).Controls("&My Tools")
MU.Delete
End Sub

I have the following references selected:
Visual basic for applications
Microsoft Excel 12.0 Object library
OLE Automation
Microsoft office 12.0 Object library

Any assistance will be appreciated.

Regards.

Sean
 
Ad

Advertisements

J

joel

Office 2002 uses 10.0 libraries
Office 2003 uses 11.0 libraries
Office 2007 uses 12.0 libraries

You have a choice in any version to select the latest version or a previous
version. If yo have 2007 and want 2003 and 2007 to use your code select the
highest common version.
 
B

Barb Reinhardt

But if you edit it in 2007 and send to 2003, it'll still have the 2007
references. The best way around this is late binding.
 
B

Barb Reinhardt

FWIW, Command bars are no longer used in Excel 2007. You'll need to modify
the ribbon to do what you want.

Ron DeBruin has put something together on editing the ribbon if you want to
go there.

http://www.rondebruin.nl/ribbon.htm

You'll need to check for the application version

If Val(Application.Version)>=12 then
'Do your Excel 2007 stuff.
else
'Do your Excel 2003 or less stuff.
end if

HTH,
Barb Reinhardt
 
B

Beans

Hi,

Thanks for that.

I am using the latest library, vis. 12.0. As you explain, I would have
though that is was the case.

I just don't understand why my ad in loaded OK under the OEM install and it
does not work after the reinstall. I am assuming that there is a setting
somewhere that is different.

Thanks.

Sean
 
Ad

Advertisements

B

Beans

Hi,

That is the kind of thing that I would have expected. What is confusing is
that my add-in loaded OK under the OEM install and it seemed to work. The
menus and toolbars appeared under the Add-in ribbon.

I am thinking that there must be some setting that is different now that I
have done an reinstall.

Thanks for the link to the ribbon editing helper. I will have to look at
that. I was just hoping to get the thing working again like it was under the
OEM install until I can find the time to look into the ribbon.

Thanks.

Sean
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top