Object library references

JerryGiese

Active Member
Joined
Jun 27, 2005
Messages
323
I have an access database application that I have developed over the years at work. I am about to change jobs soon and I am working on fixing all the bugs and quirks before I go so other people can continue to use it in the future. An issue I am having comes from upgrading access to a newer version and having to update the library references. For example, when we upgraded to office 2007, I had to go in and uncheck the Microsoft Office 11.0 Object Library and check the newer Microsoft Office 12.0 object library. Is there a way that I can setup this up to automatically choose whichever version of the Microsoft Office object library is currently available on that particular machine?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
1. You should not have to check the newer version when upgrading. Access will automatically upgrade it to the correct version if you are going from a lower version (11.0) to a higher version (12.0).

2. If potential users of 11.0 could use it after you have opened it in 12.0 then it will have a reference problem and it would need to be set back to 11.0 for the 11.0 users. This is not a problem if you do not have users from previous versions using it after you have upgraded.

3. To avoid any reference issues it is best to use what is called LATE BINDING where you do NOT set any references and then you declare your objects as objects and then use code like this (for example using Excel in Access):
Code:
Dim objXL As Object
 
Set objXL = CreateObject("Excel.Application")
And so on where normally, if you had set references you might have used this:
Code:
Dim appXL As Excel.Application
 
Set appXL = New Excel.Application

And so on (the same goes for other lower objects as well).

Does that help?
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top