> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Adding References from VBA
- URL: https://nolongerset.com/adding-references-from-vba/
- Published: 2022-08-25T20:41:22.000Z
- Updated: 2026-05-08T12:55:12.000Z
- Description: Did you ever wish you could bypass the Tools > References dialog entirely when adding references in Access? Automate the process with some simple VBA.
- Author: Mike Wolfe
- Tags: Quick Tip, Hidden Features, #Import 2026-05-20 02:59

To use **[early binding](https://nolongerset.com/early-binding-vs-late-binding/)**, you must add References to your VBA project.

Go to **Tools > References...** to do this manually from the VBA editor. 

But what if you want to add those references programmatically, via VBA? To do this, you can use the [AddFromGUID method](https://docs.microsoft.com/en-us/office/vba/api/access.references.addfromguid) of the Access Application References collection.

```vba
'Add a reference to the Microsoft Scripting Runtime
References.AddFromGUID "{420B2830-E718-11CF-893D-00A0C9054228}", 1, 0
```

## Finding GUIDs for References

That's great and all...but how are you supposed to find the GUIDs in the first place?

The simplest approach is to manually add the reference to your project, then cycle through all the project references and print the required information to the Immediate Window. In fact, you can use the following one-liner to print the required info directly *from* the Immediate Window:

```vba
For Each ref In References:?ref.Name, ref.GUID, ref.Major, ref.Minor:Next
```

![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2022/08/image-76.png)

---

### External references

[References.AddFromGUID method (Access)Office VBA reference topicMicrosoft Docso365devx![](https://docs.microsoft.com/en-us/media/logos/logo-ms-social.png)](https://docs.microsoft.com/en-us/office/vba/api/access.references.addfromguid)

### Referenced articles

[Early Binding vs. Late Binding: The Essential Guide for VBA DevelopersThe Absolute Minimum Every VBA Developer Absolutely, Positively Must Know About Early and Late Binding in COM (No Excuses!)![](https://nolongerset.com/favicon.png)No Longer SetMike Wolfe![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2021/11/Early-Binding-vs.-Late-Binding.jpg)](https://nolongerset.com/early-binding-vs-late-binding/)