Delen via


'#ElseIf', '#Else', or '#End If' must be preceded by a matching '#If'

#ElseIf, #Else, and #End If are conditional compilation directives. The #ElseIf, #Else, or #End If is not preceded by a corresponding #If directive.

Error ID: BC30013

To correct this error

  1. Check that the intended #If is not separated from the clause in question by an intervening conditional compilation block or an incorrectly placed #End If.

    Note

    Only one #Else is permitted in each #If block, so two successive #Else directives cause this error.

  2. Check that the leading # is not missing from an earlier #If directive.

  3. If everything else is in order, add an #If directive to the beginning of the conditional compilation block.

See Also

Reference

#If...Then...#Else Directives