'Else' must be preceded by a matching 'If' or 'ElseIf'

An Else statement occurs without a corresponding If statement. Else must be preceded by an If statement.

Error ID: BC30086

To correct this error

  1. If this If block is part of a set of nested If blocks, make sure each block is properly terminated.

  2. Verify that other control structures within the If block are correctly terminated.

  3. Ensure that this If block is correctly formatted.

See Also

Reference

If...Then...Else Statement (Visual Basic)