VBS序结果判断

在每次写完代码,在窗口里总是有人点“取消”,可是程序还是直接往下运行。

可以把代码改成这样:

dim str

str=msgbox("这是我的VBS判断程序", vbYesNo, "    ")

if str=vbYes then

    msgbox("    ")

else

    msgbox"    "

    set sh=wscript.createobject("wscript.shell")

    sh.run"echo 我的第一个VBS程序"

end if

猜你喜欢

转载自blog.csdn.net/ltxemail/article/details/129206328
vbs