有没有退出/破坏whileVBS/VBA的方法?
以下代码无法按预期工作:
num = 0
while (num < 10)
if (status = "Fail") then
exit while
end if
num = num+1
wend
Run Code Online (Sandbox Code Playgroud)
Hel*_*len 58
VBScript的While循环不支持提前退出.使用Do循环:
num = 0
do while (num < 10)
if (status = "Fail") then exit do
num = num + 1
loop
Run Code Online (Sandbox Code Playgroud)