Unexpected 'Next'

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

Unexpected 'Next'

You created a For...Next or a For Each...Next construct, but did not include the For statement. For example, you could have attempted to remove a For...Next construct, but did not remove the Next statement. The following demonstrates the correct usage of the For...Next construct.

For counter = start To end [Step step]
    [statements]
    [Exit For]
    [statements]
Next

To correct this error

  • Add the For statement (the loop control statement).
  • Remove the extra Next statement.
See Also

For...Next Statement | For Each...Next Statement | Looping Through Code | Exit Statement


VBScriptOnline.com - Runtime Errors, Syntax Errors