Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jan 2005
    Posts
    1
    Thanks
    0
    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.

    Any ideas?

    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 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).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •