Training
Module
Add decision logic to your code using `if`, `else`, and `else if` statements in C# - Training
Learn to branch your code's execution path by evaluating Boolean expressions.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Else If, Else, and End If are conditional compilation directives. This error has the following cause and solution:
An #elseif
, #else
, or #endif
was detected that isn't preceded by a matching #if
clause. Check to see if the intended #if
has been separated from the clause in question by an intervening block or if the intended #if
is preceded by a number sign (#
) sign. If everything else is in order, place an #if
clause in the appropriate position.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Training
Module
Add decision logic to your code using `if`, `else`, and `else if` statements in C# - Training
Learn to branch your code's execution path by evaluating Boolean expressions.