Skip to content

VBA140 — Named argument not found

Severity: 🔴 error Category: signature Phase: 2.9

Description

A name:=value call argument names a parameter the target procedure does not declare.

Failing example

Sub S(ByVal a As Long)
End Sub
Sub T()
    Call S(b:=1)
End Sub

Compliant example

Sub S(ByVal a As Long)
End Sub
Sub T()
    Call S(a:=1)
End Sub

How to fix

Use a parameter name that exists in the procedure signature.


Source: src/rules.py — entry VBA140.