Subject: Refernces in VBA
Posted By: IanPike Post Date: 11/17/2003 7:20:53 AM
I have a VBA script running which goes away to a SQL database to get information.  On the machine that i have developed the script it works fine as i have gone TOOLS|REFERENCES and picked on Microsoft Active X Data Objects 2.7 Library.  However when i run it on another machine this library shows as missing.  Can i get my VB script to check if the DLL is referenced and if not load it?

PS I am quite new to this game so i apologise if this is a simple one but it is causing me all sorts of problems

Thanks
Ian PIke

Reply By: chrislepingwell Reply Date: 11/17/2003 7:28:21 AM
Ian, you'll need to install MDAC 2.7 (microsoft data access components), which can be downloaded from microsoft.  Unfortunately, I don't think you can get your script to do it, because it will complain about missing components before actually running any code.  It might be an idea to recompile your original script using ADO 2.1 (unless you are using some 2.7 specific method), as this should run on versions of Excel from 97 onwards.  Or you could just repoint your script on the destination machine to whatever version of ADO it has.

HTH

Chris



There are two secrets to success in this world:
1. Never tell everything you know

Go to topic 6293

Return to index page 1004
Return to index page 1003
Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997
Return to index page 996
Return to index page 995