Repair Missing Library References

jk12

Always getting problems.
Local time
Today, 04:17
Joined
Feb 16, 2006
Messages
91
Hi all. After having spent pretty much all of this morning searching for a solution though numerous posts, I am still lost.

I have been given a database that I was told was created in 2000 but it is updated in 2003. The problem I've got is there are users on 2000 and 2003 which means any changes made in 2003 sets the library references for 2003 meaning any of my 2000 users then get missing references when they open the database. The library references causing the problem are:

Microsoft Excel 11.0 Object Library
Microsoft Word 11.0 Object Library

Both of these I believe should be 9.0 for 2000 users.

I can go to a 2000 machine change the library reference which will then set this reference to be correct for 2000 and 2003 users but this is annoying to do after every update.

What I am basically asking for is if there is a way (using VBA maybe) to on the database open, check to see if these references are missing and if so repair them to the correct reference.

Sorry if I have talked a load of pointless rubbish.

Thanks
 
Hi all. After having spent pretty much all of this morning searching for a solution though numerous posts, I am still lost.

I have been given a database that I was told was created in 2000 but it is updated in 2003. The problem I've got is there are users on 2000 and 2003 which means any changes made in 2003 sets the library references for 2003 meaning any of my 2000 users then get missing references when they open the database. The library references causing the problem are:

Microsoft Excel 11.0 Object Library
Microsoft Word 11.0 Object Library

Both of these I believe should be 9.0 for 2000 users.

I can go to a 2000 machine change the library reference which will then set this reference to be correct for 2000 and 2003 users but this is annoying to do after every update.

What I am basically asking for is if there is a way (using VBA maybe) to on the database open, check to see if these references are missing and if so repair them to the correct reference.

Sorry if I have talked a load of pointless rubbish.

Thanks

This is possible but in a multi platform environment like this I would go without references.

So your code would change from this

Code:
Dim xlApp as Excel.Application

Set xlApp = New Excel.Application

to this

Code:
Dim xlApp as Object

Set xlApp = CreateObject("Excel.Application")

This has the advantage of using whatever excel library is on the system and you don't need to keep up with changing references, the downside is you lose the intellisense features but if the program is already coded then you really don't need them anymore.

The other way you could go is to add references using the
Code:
Application.References.AddFromFile
method.
 
Sounds like a good idea, will give it a go.

Cheers
 

Users who are viewing this thread

Back
Top Bottom