You created a If...Then...Else construct, but did not include the Then keyword in the first line. The following demonstrates the correct structure of a If...Then...Else construct.
Copy Code | |
---|---|
IfconditionThenstatements [Elseelsestatements ] |
Or, you can use the block form syntax:
Copy Code | |
---|---|
IfconditionThen [statements] [ElseIfcondition-nThen [elseifstatements]] . . . [Else [elsestatements]] EndIf |
To correct this error
Make sure that the If...Then...Else construct includes all the necessary parts.
See Also