View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Upgrading to 2007 - Object library invalid

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

"Beans" wrote:

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