Error 800a0401
Contents |
800A0401 - Expected End of Statement Good news, here is another example of a WSH error message with a helpful Char: number. Count along the line until you get to the offending character. With Error 800A0401 start by looking for
Vb6 Error 800a0401
missing ampersands (&). Introduction to Code 800A0401 Error code, 800A0401 occurs when you execute a 800a0401 vbscript compilation error VBScript. This is a compilation error, therefore check your punctuation. A wild guess, you have left out an ampersand (&), or possibly a
Expected End Of Statement Vbscript Compilation Error
comma. The Symptoms You Get The script does not execute as you had hoped. Instead, Windows Scripting host generates a message box like this picture: Good news, I have three examples of code: 800A0401. The Cause of microsoft vbscript compilation error '800a0401' expected end of statement dim Code 800A0401 VBScript Error Your VBScript contains a punctuation error. Note: The clue from Source: Microsoft VBScript compilation error, this means a syntax error in your script. In this case the Char: number (33) is particularly valuable in troubleshooting. The Solution to Error: Expected end of statement Check the syntax of your script, in particular double-check punctuation marks (&, comma, speech marks or full stop.). In this instance, Windows Scripting Host has detected a mix-up between vbscript expected end a comma and a full stop. As ever, a line number is helpful when troubleshooting, moreover, any Char : number other than 1, will pin-point the problem. ‡ Example 1 of Script for Code 800A0401 Note: The error is at Line 3, Character 33 - wbemServices, Instances It should be wbemServices.Instances (Full stop, and not a comma) ' VBScript Error 800A0401strComputer = "Alan" set wbemservices = GetObject("Winmgmts:\\" & strComputer) set wbemObjectSet = wbemServices, InstancesOf ("win32_LogicalMemoryConfiguration") For each wbemobject in wbemobjectset WScript.echo "Tot Physical Memory " & wbemobject.totalPhysicalMemory Next Guy Recommends: A Free Trial of the Network Performance Monitor (NPM) v11.5 SolarWinds' Orion performance monitor will help you discover what's happening on your network. This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload. What I like best is the way NPM suggests solutions to network problems. Its also has the ability to monitor the health of individual VMware virtual machines. If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now. Download a free trial of Solarwinds' Network Performance Monitor Example 2 of Script for Error 800A0401 Problem Wscript.Echo objNetwork.UserName " at " & objNetwork.ComputerName An & (ampersand) is missing it should be: Correction Wscript.Echo objNetwork.UserName & " at " &
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 About Us Learn more about
Expected End Of Statement Error In Qtp
Stack Overflow the company Business Learn more about hiring developers or posting ads expected statement error in vbscript with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow
Vbscript Compilation Error Expected Statement
is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error declaring a variable, What Im Doing wrong up vote 1 down vote http://www.computerperformance.co.uk/Logon/code/code_800A0401.htm favorite I'm declaring a string variable this way in classic ASP: Dim i As String And getting this error: Microsoft VBScript compilation error '800a0401' Expected end of statement /retencion/Estadisticas/Detail.asp, line 10, column 6 Dim i As String -----^ Why is that? asp-classic share|improve this question edited Jul 31 '09 at 14:14 Tomalak 207k40344462 asked Jul 31 '09 at 13:58 user136224 73413 add a comment| 5 Answers 5 active oldest votes http://stackoverflow.com/questions/1212692/error-declaring-a-variable-what-im-doing-wrong up vote 6 down vote accepted Classic ASP is written in VBScript and isn't Visual Basic itself, so you can't declare things as strings. Loosely typed I think is the phrase to describe it. Basically, you have to leave out the "as" and anything after it. Try: <% Dim i 'you can now use the variable as you want. i = "whatever" %> share|improve this answer answered Jul 31 '09 at 14:02 Amadiere 7,23443145 Tnks its true, I cant use "as" –user136224 Jul 31 '09 at 14:09 1 Just to clarify Classic ASP uses "a" script language which by and large is VBScript. However it may also be Javascript or any other script language designed to work with the windows script host. –AnthonyWJones Aug 1 '09 at 15:05 add a comment| up vote 3 down vote It's actually VBScript. You have to do this: dim i i = "some string" share|improve this answer answered Jul 31 '09 at 14:01 Austin Salonen 33.4k981112 add a comment| up vote 2 down vote I believe in classic ASP you can't give an explicit type to your variables. They all have to be variants and they have to be declared with no As clause, e.g. "dim i".
Code 800A0401 If this is your first visit, be sure to check out the http://www.vbforums.com/showthread.php?549547-Error-Expected-end-of-statement-Code-800A0401 FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: Error: Expected end of statement, Code vbscript compilation 800A0401 Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Dec 7th, 2008,02:13 PM #1 LVSA View Profile View Forum Posts Thread Starter New Member Join Date Dec 2008 Posts 1 Error: Expected end of statement, Code 800A0401 I am vbscript compilation error getting an Expected end of statement, Code 800A0401 on Line: 1 and Char: 11. However this line is a comment. I know I must have a syntax error somewhere but, I cannot find it. Any suggestions? ' -------------------------------------------------- ' VBScript Source File — Created with XLnow OnScript ' VBS Logon Script (xxx) ' AUTHOR: xxx ' COMPANY: xxx ' DATE: 12/06/2008 ' COMMENT: Goup Logon Script ' -------------------------------------------------- ON ERROR RESUME NEXT Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path, objNetwork, objNetworkl Set WSHShell = CreateObject("WScript.Shell") Set WSHNetwork = CreateObject("WScript.Network") 'Automatically find the domain name Set objDomain = getObject("LDAP://rootDse") DomainString = objDomain.Get("dnsHostName") WinDir = WshShell.ExpandEnvironmentStrings("%WinDir%") 'Grab the user name UserString = WSHNetwork.UserName 'Bind to the user object to get user name and check for group memberships later Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString) 'Grab the computer name for use in add-on code later strComputer = WSHNetwork.ComputerName 'Disconnect AL