Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help on Object Library Invalid or contains.... Gennie Excel Programming 5 November 28th 08 12:05 PM
object library or invalid reference Bob Flanagan[_2_] Excel Programming 3 May 17th 08 05:27 PM
Object library Invalid Ayo Excel Programming 3 March 28th 07 01:52 PM
Object library Invalid JLGWhiz Excel Programming 0 March 27th 07 11:45 PM
object library invalid succhu Excel Programming 0 March 2nd 04 05:21 PM


All times are GMT +1. The time now is 03:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"