set reference with VBA

V

Vsn

Hi,

Could someone tell me how i could set references with VBA code in the
starting procedure of an application so that it will run on computers where
the users have not set the required references? References needed for the
application i am working on are among the standard once 'Microsoft DAO 3.6
Object Libary' and 'Microsoft Excel 11.0 Object Libary'.

Thanks for all help.

Cheers,
Ludovic
 
D

Douglas J. Steele

References live in each of the database: it's not a case of setting it in
each user's installation.

You shouldn't need to do anything.

For Excel, you really should consider using Late Binding so that no
reference is required.

Yes, if you used a different version of the DAO library than they have
installed, you can run into problems. Take a look at what MichKa has to say
at http://www.trigeminal.com/usenet/usenet026.asp As long as you can get
your code to run immediately on opening the database, you should be able to
delete the reference to DAO that's broken in the database you distributed,
and use the AddFromFile method to replace it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top