Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Expected 'Then'

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.


                      If condition Then statements [Else elsestatements ] 

Or, you can use the block form syntax:


                      If condition Then
   [statements]
[ElseIf condition-n Then
   [elseifstatements]] . . .
[Else
   [elsestatements]]
End If

To correct this error

  • Make sure that the If...Then...Else construct includes all the necessary parts.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.