[AccessD] Set Reference using VBA

Darren D darren at activebilling.com.au
Sun Feb 17 17:44:33 CST 2008


Hi Darryl

I do have some semi complex code that does what you need - But we will try
simple first
You can wrap a line like the one below in a shell call behind a button or in an
OnLoad event

Somethinglike
~~~~~~~~~~~~~~~~~
Dim strRegPath as string
strRegPath = "regsvr32 c:\program files\common files\microsoft
shared\dao\dao360.dll"
Call Shell (strRegPath, WIN_NORMAL)
~~~~~~~~~~~~~~~~
- That should work - You may have to play about with quotes - not sure
You can then set up variables for passing the relevant DLL etc

Darren
-----------------
T: 1300 301 731

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darryl Collins
Sent: Monday, 18 February 2008 9:45 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Set Reference using VBA


Hey all,

I know this can be done in Excel and am hoping it can be done in access.  Can I
get Access to look for and set a reference to a .dll file using code?

Bascially I want to automate the (from the VBE) Tools > Reference > Set
Reference > (Browse > select > Ok).

Many thanks

Regards
Darryl.

This email and any attachments may contain privileged and confidential
information and are intended for the named addressee only. If you have received
this e-mail in error, please notify the sender and delete this e-mail
immediately. Any confidentiality, privilege or copyright is not waived or lost
because this e-mail has been sent to you in error. It is your responsibility to
check this e-mail and any attachments for viruses.  No warranty is made that
this material is free from computer virus or any other defect or error.  Any
loss/damage incurred by using this material is not the sender's responsibility.
The sender's entire liability will be limited to resupplying the material.

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.5 - Release Date: 14/02/2008 12:00 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.20.5 - Release Date: 14/02/2008 12:00 AM
 




More information about the AccessD mailing list