Skip to content

VBA006 — Argument count mismatch

Severity: 🔴 error Category: signature Phase: 0

Description

A call passes too few or too many arguments for the target procedure.

Failing example

MsgBox()  ' MsgBox needs at least 1 arg

Compliant example

MsgBox "hello"

How to fix

Match the procedure signature; check Optional / ParamArray markers.


Source: src/rules.py — entry VBA006.