ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Upgrading to 2007 - Object library invalid (https://www.excelbanter.com/excel-programming/427912-upgrading-2007-object-library-invalid.html)

Beans[_2_]

Upgrading to 2007 - Object library invalid
 
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


joel

Upgrading to 2007 - Object library invalid
 
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.


"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



Barb Reinhardt

Upgrading to 2007 - Object library invalid
 
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.

"joel" wrote:

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.


"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



Barb Reinhardt

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



Beans[_2_]

Upgrading to 2007 - Object library invalid
 
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

"joel" wrote in message
...
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.


"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




Beans[_2_]

Upgrading to 2007 - Object library invalid
 
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



"Barb Reinhardt" wrote in message
...
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





All times are GMT +1. The time now is 07:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com