Fix Invalid Procedure Call or Argument in Microsoft Access VBA
Question details
The user needs to fix an Invalid procedure call or argument error triggered by a command button running VBA code with Collections.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Clicking a command button or executing VBA code that interacts with Collections or external object libraries.
- Observed behavior
- An Invalid procedure call or argument error appears, halting code execution. This is often caused by broken references, platform differences, or specific local installations.
Create a secure backup copy of your Microsoft Access database before modifying VBA references or running repair tools to prevent accidental data loss.
Check and Remove Unused Outlook Object Library References
Broken or unnecessary references to external libraries, such as the Microsoft Outlook Object Library, frequently trigger this error. Removing them can resolve the conflict.
If your VBA project contains references to object libraries that are either missing on the current computer or unnecessary for the code to run, Access may throw a procedure call error. Removing the Outlook library reference is a common fix if the database does not actually require Outlook integration.
Open your Microsoft Access database and press ALT + F11 to launch the Visual Basic for Applications (VBA) editor.
In the top menu bar, click on 'Tools' and select 'References' from the drop-down menu.
Scroll through the list of Available References to find 'Microsoft Outlook 16.0 Object Library' (the version number may vary). If it is checked and your code does not require it, uncheck the box.
Click 'OK'. Next, click 'Debug' > 'Compile Database' in the top menu to ensure there are no remaining errors, then save your project.

Run Compact and Repair Database
Compacting and repairing the database can fix minor corruptions that cause collection or procedure errors.
Repair the Microsoft Office Installation
If the database works on other computers but fails on yours, repairing the Office suite can fix missing or unregistered system components causing the issue.
Try WPS Office for Your Document and Spreadsheet Needs
While WPS Office does not directly replace Microsoft Access databases, it is an excellent, lightweight alternative for managing Word documents, Excel spreadsheets, and PowerPoint presentations without the heavy installation footprint or complex VBA reference conflicts.

Frequently Asked Questions
What does 'Invalid procedure call or argument' mean in VBA?
This error occurs when a function or method is called with parameters that exceed its valid range, or when the VBA project is trying to use an object library reference that is missing, broken, or incompatible with the current system.
Why does this Access VBA error only happen on one computer?
The error is often tied to computer-specific installations. The affected PC might be missing a required DLL file, running a different bit-version (32-bit vs 64-bit) of Office, or suffering from a corrupted object library reference.
How do I know which VBA reference is broken?
Open the VBA Editor by pressing ALT + F11, then go to Tools > References. If a reference is broken, it will typically have the word 'MISSING:' written next to it in the Available References list.




