Error 800a0400 Expected Statement
Contents |
- Expected Statement Perhaps instead of 'Expected Statement', 'missing character' would be a better error message. I have noticed with error 800A0400 how often the problem is at the beginning or the end of the line mentioned in the vbs error 800a0400 error message. Introduction to Code 800A0400 Error code 800A0400 is a generic message when you
Vbscript Compilation Error 800a0400
execute a VBScript. A wild guess, you have missed a command at the beginning of a line. The Symptoms You Get The
(1 1) Microsoft Vbscript Compilation Error Expected Statement
script does not execute as you had hoped. Instead you get a message box like this picture: The Cause of Error 800A0400 Your VBScript contain is missing a statement. This is a difficult error to track down.
Vbscript Compilation Error Expected End Of Statement
However, the good news is that I have three examples. Most likely you have placed a statement, which is not appropriate for the logic of your script. For example, extra brackets, or missing command. Note: the clue 'Source: Microsoft VBScript compilation error'. My point is that 'compilation error' and not a 'runtime error', means this is a syntax error in your script. The Solution for Error: Expected statement The Windows Scripting Host gives 800a0400 expected_statement 80 us two useful clues, firstly, look on Line: 10, do count any remark or empty lines. Secondly, the Char: number 1, is useful in tracing the error. In this case there is something wrong with the Select statement. The line number, as is so often the case, is crucial to solving this error. The problem is that the whole line is gibberish to the VBScript engine. So take another look at each word, punctuation and see if you can spot a simple error. ‡ Example 1 of Error code: 800A0400Missing underscore at the end of the line 7: ' WSHname.vbs' Sample VBScript to check WSH Version' Author Guy Thomas http://computerperformance.co.uk/' Version 2.3 - September 2010 ' -------------------------------------------------------On Error Resume Next WScript.Echo "WSH Version: " & WScript.Version & " " & WScript.BuildVersion & vbcr & "File name: " WScript.ScriptName WScript.Quit SolutionMissing underscore at the end of the line:WScript.Echo "WSH Version: " & WScript.Version & " " & _ ' WSHname.vbs' Sample VBScript to check WSH Version' Author Guy Thomas http://computerperformance.co.uk/' Version 2.3 - September 2010 ' -------------------------------------------------------On Error Resume Next WScript.Echo "WSH Version: " & WScript.Version & " " & _ WScript.BuildVersion & vbcr & "File name: " WScript.ScriptName WScript.Quit Guy Recommends: A Free Trial of the Network Performance Monitor (NPM) v11.5 SolarWinds' Orion performance monitor will help you
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site expected statement end if About Us Learn more about Stack Overflow the company Business Learn more about vbscript expected ')' hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join microsoft vbscript compilation error '800a0401' expected end of statement the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up VBS expected statement error http://www.computerperformance.co.uk/Logon/code/code_800A0400.htm up vote 0 down vote favorite I keep getting a Error Expected statement. Code 800A0400. Line 1, char 1. What am I doing wrong? My code, # $language = "VBScript" # $interface = "1.0" ' Connect to an SSH server using the SSH2 protocol. Specify the ' username and password and hostname on the command line as well as ' some SSH2 protocol specific options. Sub http://stackoverflow.com/questions/24786019/vbs-expected-statement-error Main Dim host host = "ssh.google.com" Dim user user = "userinfo" ' Prompt for a password instead of embedding it in a script... ' Dim passwd passwd = crt.Dialog.Prompt("Enter password for " & host, "Login", "", True) ' Build a command-line string to pass to the Connect method. ' cmd = "/SSH2 /L " & user & " /PASSWORD " & passwd & " /C 3DES /M MD5 " & host crt.Session.Connect cmd End Sub vbscript compiler-errors share|improve this question asked Jul 16 '14 at 16:29 Tylendel Zollmann 52 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted The "comment to end of line" marker in VBScript is the single quote ', not #. So change # $language = "VBScript" # $interface = "1.0" to ' $language = "VBScript" ' $interface = "1.0" (Other possible problems: do you call Sub main? Where does crt come from?) share|improve this answer answered Jul 16 '14 at 16:38 Ekkehard.Horner 29.9k11934 Thank you that got rid of it. I am not calling sub main at the moment. I just copied this script form a tutorial form to try and learn
+ Ask a Question Need help? Post your question and get tips & solutions from a community of 418,502 IT vbscript compilation Pros & Developers. It's quick & easy. Microsoft VBScript compilation error '800a0400' Expected statement P: 1 buri22 I have this error : Microsoft VBScript compilation error '800a0400' Expected statement vbscript compilation error /amministrazione/add2_sponsor.asp, line 11 <% ^ The code of file "add2_sponsor.asp : Expand|Select|Wrap|Line Numbers <%@LANGUAGE="VBSCRIPT"CODEPAGE="1252"%> <%Session.LCID=1040%>