Fix VBA Error 5 When Passing an Empty ParamArray After a Windows Update
Question details
Resolve Error 5 in VBA or VB6 code that passes an empty ParamArray as a Variant after a Windows update.

- Product
- Microsoft VBA and Visual Basic 6
- Device & OS
- Windows (version not provided)
- Scenario
- VBA or VB6 code passes an empty ParamArray to another procedure as a Variant.
- Observed behavior
- After an August 2019 cumulative Windows update, the code may fail with Error 5: Invalid procedure call or argument.
Identify the Windows version and the installed update, then locate the VBA or VB6 call that passes the empty ParamArray. Check whether the receiving procedure can safely accept an extra argument before changing the call.
Install a Windows Update That Corrects the ParamArray Issue
Use this approach to address the Windows component responsible for the regression.
The issue was associated with a security mitigation in oleaut32.dll included in affected August 2019 updates. The mitigation could cause calls involving an empty ParamArray to return an invalid-argument error.
Press Windows + R, enter winver, and select OK. Note the Windows version and build.
Open Windows Update and view the update history. Compare installed updates with the relevant Microsoft Knowledge Base articles, such as KB4512508 or KB4512517, for your Windows version.
In Windows Update, select Check for updates and install an available update that includes the correction. For older Windows versions, consult the relevant Microsoft Knowledge Base article for update availability and installation instructions.
Restart Windows if prompted, then run the affected VBA macro or VB6 application again with an empty ParamArray.

Pass an Additional Argument as a Temporary Workaround
Use this workaround when the affected code can be changed and the receiving procedure can safely handle an extra argument.
Work With Office Documents in WPS Office
WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and support for Microsoft Office formats make it easier to move existing files. It does not correct the Windows VBA or VB6 ParamArray error.

Frequently Asked Questions
Why does an empty ParamArray cause VBA Error 5?
Certain August 2019 Windows updates changed oleaut32.dll as a security mitigation. In affected VBA and VB6 calls, passing an empty ParamArray as a Variant could produce an invalid-argument error.
How can I check whether an affected Windows update is installed?
Open Windows Update and view the update history, then compare the installed KB numbers with Microsoft's articles for your Windows version. Reported affected updates include KB4512508 and KB4512517.
Can I fix the error without changing my VBA code?
An applicable later Windows update containing the correction may resolve it. Check Windows Update and the Microsoft Knowledge Base article for your Windows version.
Is adding an extra ParamArray argument always safe?
No. Add an argument only if the receiving procedure can accept it without changing the intended result, and test the affected macro or application afterward.
Will WPS Office fix the Windows ParamArray error?
No. The error involves a Windows component used by affected VBA or VB6 code. WPS Office is an alternative for ordinary Office document work, but it does not repair that Windows issue.




