Skip to content

VBA191 — Missing #End If

Severity: 🔴 error Category: preprocessor Phase: 3.8

Description

Every #If conditional-compilation block must be closed with #End If.

Failing example

#If Win64 Then
    x = 1

Compliant example

#If Win64 Then
    x = 1
#End If

How to fix

Add the #End If that closes the #If block.


Source: src/rules.py — entry VBA191.