Skip to content

VBA005 — Expected Array or Procedure

Severity: 🔴 error Category: type Phase: 0

Description

A scalar variable is invoked with (args) as if it were a function or array.

Failing example

Dim i As Integer
i(1)

Compliant example

Dim arr() As Integer
ReDim arr(1 To 10)
arr(1) = 0

How to fix

Declare the variable as an array or call the right procedure.


Source: src/rules.py — entry VBA005.