Expected 'Then'

Runtime Errors, Syntax Errors Home home | Other Resources other resources | Advertise with us advertise | Link to us link to us | Contact us contact | Bookmark Us!
Google
 
Where can I find good Windows Web Hosting to host my VBScript Site?
You can find good Windows Hosting which support VBScript, ASP, ASP.Net,VisualStudio.Net and MSSQL at a very reasonable low monthly fee at EasyCGI.com and DiscountASP.Net

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.
See Also

If...Then...Else Statement | Select Case Statement |


VBScriptOnline.com - Runtime Errors, Syntax Errors