创建了一个Do循环,但是未包含相关的While 或 Until 关键词。一个Do 循环的测试条件需要在测试条件语句中使用一个While或Until 关键词。下面演示 一个Do 循环的正确结构。
Do [{While | Until} condition] [statements] [Exit Do] [statements] Loop
Do [{While | Until
condition]
[statements]
[Exit Do]
Loop
或者可以使用语法:
Do [statements] [Exit Do] [statements] Loop [{While | Until} condition]
Do [statements] [Exit Do] [statements] Loop [{While | Until
要纠正该错误
代码中循环 | Do...Loop 语句 | For...Next 语句 | For...Next 语句 | While...Wend 语句 | Exit 语句