windows VBScript 预期结束 800A03F6
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1029216/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
VBScript Expected End 800A03F6
提问by GavinR
I am getting this error while trying to run a VBScript (note this is not in a web environment - just running a VBScript on Windows):
我在尝试运行 VBScript 时遇到此错误(请注意,这不在 Web 环境中 - 只是在 Windows 上运行 VBScript):
Line: [Last line]
Error: Expected 'End'
Code: 800A03F4
Source: Microsoft VBScript compilation error
I think it is an If statement that is not closed correctly with an "End If," but I've gone through every instance of "If" in the code and cannot find the error. Any tips or tools that could help me figure out where/why this error is occurring?
我认为这是一个用“End If”没有正确关闭的 If 语句,但我已经检查了代码中的每个“If”实例,但找不到错误。任何可以帮助我找出发生此错误的位置/原因的提示或工具?
回答by GavinR
There was an "Else If" - there should be no space there: "Elseif"
有一个“Else If”——那里不应该有空格:“Elseif”
http://www.w3schools.com/asp/asp_conditionals.asp
http://www.w3schools.com/asp/asp_conditionals.asp
Hopefully this will help someone out in the future.
希望这会在未来帮助某人。
回答by C. Ross
In VBScript If is not the only token that requires an End. Also look for Function's and Sub's without their appropriate end statements.
在 VBScript 中,If 不是唯一需要 End 的标记。还要寻找没有相应结束语句的Function和Sub。