Results 1 to 2 of 2
2005-01-20, 18:45 #1
- Join Date
- Jan 2005
- Thanked 0 Times in 0 Posts
Setting References Outside of VBA (2002, 2003)
Is there a way to set references from outside of VBA? For example - a batch file that sets references?
I have several apps that I want to add some features to, but each app will require the addition of a reference, so rather than going to each location, going into VBA at each site, going to tools, references, etc... I would rather do this from an external source, whether it be a VB app or a simple batch file that runs a command line option.
Thanks in advance.
2005-01-20, 18:53 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Setting References Outside of VBA (2002, 2003)
You can't set references from a batch file, but it is possible to do so from a VB application. You would still use Access VBA, though. You'd use Automation to control Access from the VB application, i.e. start Access, open the database, add items to the References colllection using the AddFromFile or AddFromGuid method, then close the database and quit Access. You need to set a reference to the Microsoft Access n.0 Object Library in Project | References... to be able to write Access VBA in VB and get IntelliSense (n=8 for Access 97, n=9 for Access 2000, n=10 for Access 2002 and n=11 for Access 2003).