Home > object required > object required string error

Object Required String Error

Contents

here for a quick overview of the site Help Center Detailed answers to any questions you vbscript error object required 800a01a8 might have Meta Discuss the workings and policies of this site object required wscript error in vbscript About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or object required error vbscript posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of

Microsoft Vbscript Runtime Error Object Required ' String

6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up VB Error “object required” up vote 6 down vote favorite I'm getting an "object required" error on line 54, the last line, when I run the following script. What is wrong? Option Explicit Dim cmdString, g_strHostFile, filepath, error 424 object required vbscript flexnetpath, importcmd, dtmToday, dtmYesterday, dtmFileDate, param1, param2, param3, i4path, objFSO, objTextStream, g_strComputer, WshShell 'Initialize global constants and variables. Const FOR_READING = 1 g_strHostFile = "D:\dataimports\LUM_servers.txt" i4path = "C:\IFOR\WIN\BIN\i4blt.exe" filepath = "D:\DataImports\" flexnetpath = "C:\Program Files (x86)\Flexnet\Manager\Admin" importcmd = flexnetpath & "flexnet bulkimport -uadmin -padmin -f" & filepath dtmToday = Date() dtmYesterday = Date() - 1 dtmFileDate = Year(Date) & padDate(Month(Date)) & padDate(Day(Date)) param1 = "-r1 -e2,4 -n " param2 = " -v 'Dassault Systemes' -b " param3 = " -g " WScript.Echo "i4Path: " & i4path WScript.Echo "FilePath: " & filepath WScript.Echo "flexnetpath: " & flexnetpath WScript.Echo "importcmd: " & importcmd WScript.Echo "dtmToday: " & dtmToday WScript.Echo "dtmYesterday: " & dtmYesterday WScript.Echo "dtmFileDate: " & dtmFileDate 'Read LUM Server Names from text file. Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FileExists(g_strHostFile) Then Set objTextStream = objFSO.OpenTextFile(g_strHostFile, FOR_READING) Else WScript.Echo "Input file " & g_strHostFile & " not found." WScript.Quit End If 'Loop through list of computers and perform tasks on each. Do U

this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click vbs error object required string the register link above to proceed. To start viewing messages, select the

How To Resolve Object Required Error In Vbscript

forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: Object required

Microsoft Vbscript Runtime Error Object Required 'wscript'

: '[String: "xxxx"] Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jul 10th, 2012,10:29 AM #1 foufou_qc View Profile http://stackoverflow.com/questions/3266074/vb-error-object-required View Forum Posts Thread Starter New Member Join Date Jul 2012 Posts 2 Object required : '[String: "xxxx"] Hi What is my error? Code: Const ForReading = 1 Const ForWriting = 2 Set objArgs = Wscript.Arguments If objArgs.Count <> 3 then Wscript.Echo "Manque des paramètres: Fichier ASCII, Valeur recherche puis Nouvelle valeur" End if For I = 0 to objArgs.Count -1 'rgs.Count - http://www.vbforums.com/showthread.php?683834-Object-required-String-quot-xxxx-quot 1 WScript.Echo objArgs(I) 'vérifie mes paramètres Select Case I Case 0 : Set FichierASCII = objArgs(I) Case 1 : Set ValeurRecherche = objArgs(I) Case 2 : Set NouvelleValeur = objArgs(I) Case Else : Wscript.Echo "trop de parametres: Fichier ASCII, Valeur recherche puis Nouvelle valeur" End Select Next Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(FichierASCII, ForReading) strText = objFile.ReadAll objFile.Close My first image is my parameter before set to FichierASCII. My second image is my error line 14 : Case 0 : Set FichierASCII = objArgs(I) Why? Thank's a lot Attached Images Reply With Quote Jul 10th, 2012,12:30 PM #2 techgnome View Profile View Forum Posts PowerPoster Join Date May 2002 Posts 29,829 Re: Object required : '[String: "xxxx"] since the objArgs are strings, the variable shouldn't be set.... Set FichierASCII = objArgs(I) Set is only needed for objects... which isn't what you're dealing with here... it should be a simple assignment: FichierASCII = objArgs(I) -tg * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.* * I also don't respond to friend requests. Save a few

: 753 Scores: 0 Reward points : 0 Joined: 8/21/2006 Status: offline Object http://www.visualbasicscript.com/Object-Required-String-Error-m73732.aspx Required [String: Error Friday, June 26, 2009 1:36 AM (permalink) 0 Hello, I am getting an error of: Object Required[String:Profile Removal Oper"]" On the 63, 4 of my code which is: Set FileR = oFileSystemObject.OpenTextFile(sShellRndTmpFile ,1, True).ReadAll My full code is: Local Profile Removal

 

© Copyright 2019|winbytes.org.