Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Depending on what the code is for, there are (at least) two different ways to do this, without working at the VB Extensions level (which is where you'd copy and paste code, at least in VBA):</p> <ol> <li><p>Make the code part of an add-in. It can then be loaded, and stay loaded and exposed, to any other application.</p></li> <li><p>If the code is working on data only, consider writing a procedure that links and unlinks the table(s) in each mdb file that needs processing.</p></li> </ol> <p>The advantage of #2 over #1 (and, indeed, over copying and pasting code) is that you can invoke your simple routine once, not hundreds of times.</p> <hr> <p>EDIT:</p> <p>There are two ways to invoke an add-in, depending on who is meant to invoke its functionality, and how.</p> <ol> <li>Through the UI. Use this when you want an end user to be able to use it, especially practical for functionality you'll invoke often. How to: a. Office button > Access options > Add-ins tab b. If it's a .NET add-in (or any other non-Access add-in), choose COM Add-in from Manage dropdown. If it's Access, choose Access. Click go c. Click Add button in the form that pops up, browse to the add-in.</li> </ol> <p>You will still need to provide some sort of UI to it: a commandbar, a ribbon button, a form, something. That's a separate discussion</p> <ol> <li>Through code. Use this if you're just wanting to invoke it as part of some other VBA procedure. a. VBE window > Tools > References b. Browse button c. Change the dropdown in file of type if you're setting up an Access add-in.</li> </ol> <p>You can then call the line of code directly, as if it were part of your current project. If you wish to be more explicit, you can also invoke it by library name: MyAddInName.ChangeLink</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload