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.
ElseIf is a conditional compilation directive. This error has the following causes and solutions:
An
#elseifhas been detected that isn't preceded by an#ifor#elseif. Place an#ifstatement before the#elseifor remove an incorrectly placed preceding#endif.An
#elseifhas been detected that is preceded by an#elseor#endif. Appropriately terminate the preceding#ifblock, or change the preceding#elseto an#elseif.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).
Support and feedback
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.