Skip to content

VBA330 — Class is missing an interface method

Severity: 🔴 error Category: interface Phase: 3.1

Description

When a class declares Implements <Interface>, every public Sub / Function / Property of that interface must have a matching <Interface>_<Member> method.

Failing example

' IShape:
Public Sub Draw(): End Sub
' Square:
Implements IShape
' missing IShape_Draw

Compliant example

' Square:
Implements IShape
Public Sub IShape_Draw(): End Sub

How to fix

Add the missing Interface_Member methods.


Source: src/rules.py — entry VBA330.