Another option is to use late binding and eschew the reference to Access
completely.
You'll be able to check to see if Access is installed and process accordingly.
Some references:
http://support.microsoft.com/default...b;EN-US;244167
INFO: Writing Automation Clients for Multiple Office Versions
http://support.microsoft.com/default...b;en-us;245115
INFO: Using Early Binding and Late Binding in Automation
http://support.microsoft.com/default...b;en-us;247579
INFO: Use DISPID Binding to Automate Office Applications Whenever Possible
and Dick Kusleika has a web page at:
http://www.dicks-clicks.com/excel/olBinding.htm
that explains this with Outlook
==========
I'd develop with the references so that I could get the benefit of the
intellisense and autocomplete within the VBE, but then change to late binding
before sharing with others.
sam wrote:
Can I write a macro to select a particular reference in
"Tools---References---...." I have a system where excel userform and access
database is used, and not all users have access on their machines.
To make this system work I have to select "Tools--References--Microsoft
Access 12.0 Object Library" and as access is installed in all machines, Users
get "Missing" in front of access reference and hence cannot use the userform.
NOTE: access is not involved in the system until later. There are 3 steps in
this sysetm: 1--2--3
1: users input their data into userform and click submit
2: once users click submit I get an email as an excel attachment with their
data
3: In that email attachment I have an "Accept" button, Once I hit accept
then it populates in access.
Please Help
Thanks in advance.
--
Dave Peterson