You created a Do loop, but did not include the associated While or Until keywords. The test condition of a Do loop requires either a While or an Until keyword in the test condition statement. The following demonstrates the correct structure of a Do loop.
Copy Code | |
---|---|
Do [{While | Until} condition] [statements] [Exit Do] [statements] Loop |
Or, you can use this syntax:
Copy Code | |
---|---|
Do [statements] [Exit Do] [statements] Loop [{While | Until} condition] |
To correct this error
-
Make sure that the Do loop includes all the necessary parts.
-
Terminate the Do loop with either the While or Until keywords.