Statement cannot end a block outside of a line 'If' statement

A single-line If statement contains several statements separated by colons (:), one of which is an End statement for a control block outside the single-line If. Single-line If statements do not use the End If statement.

Error ID: BC32005

To correct this error

  • Move the single-line If statement outside the control block that contains the End If statement.

See Also

If...Then...Else Statement