Skip to content

VBA131 — ParamArray is not the last parameter

Severity: 🔴 error Category: signature Phase: 2.10

Description

ParamArray must be the final parameter of a procedure.

Failing example

Sub S(ParamArray a() As Variant, b As Long): End Sub

Compliant example

Sub S(b As Long, ParamArray a() As Variant): End Sub

How to fix

Move the ParamArray to the end of the parameter list.


Source: src/rules.py — entry VBA131.