# vbaObjAddref
{: .no_toc }

Calls **IUnknown::AddRef** on the COM object at a given address.

Syntax: **vbaObjAddref** *Address*

*Address*
: *required* **LongPtr**. The address of an **IUnknown**-derived COM object --- typically the value returned by [**ObjPtr**](/tB/Modules/Information/ObjPtr.md).

The reference count of the object is incremented by one. The runtime does not validate that *Address* points at a real COM object; an invalid pointer will crash the host.

This is a low-level primitive. Ordinary code does not need it --- assigning to an **Object** variable already addrefs.

### Common Errors

| Error | When |
|---|---|
| [94 (`&H5E`)](/Reference/Run-time-Errors.md#94), *Invalid use of Null* | *Address* is **Null** |

### See Also

- [vbaObjSet](/tB/Modules/HiddenModule/vbaObjSet.md) function
- [vbaObjSetAddref](/tB/Modules/HiddenModule/vbaObjSetAddref.md) function
- [ObjPtr](/tB/Modules/Information/ObjPtr.md) function
