Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kdjonesmtb2

    How to split txt file that has "*" delimiters into separate columns in Datatable or excel

    The following code puts the entire text file that has "*" delimiters for each field/column into Column A in an Excel spreadsheet How would I get the txt file to be broken into columns by the delimiter "*"? const toRead = 1 row=1 'Dim i set objFSO = CreateObject("scripting.filesystemobject")...
  2. kdjonesmtb2

    Vbscript code to auto increment by 1 text value '0000001'

    What is the correct vbscript to auto increment a starting txt value of '0000001 by 1 For example 0000001 0000002 0000003 etc Thanks
  3. kdjonesmtb2

    Hardcoded value works in the following code but Variable does not

    Dim TESTNUM TESTNUM=Trim(DataTable.Value("TESTNUM", dtLocalSheet)) This code does not work If DataTable.GetCurrentRow=TESTNUM then RunAction "Action1 [Append footer]", oneIteration END IF This code code kicks off the action if I hard code a value to have the Append action code run...
  4. kdjonesmtb2

    Display cell locations for all populated columns in Excel 2007

    Is there a macro that can be developed for Excel 2007 that print out the Cell locations for a header row The Header row is from AA-HI I want to be able see the following as the result Header1 Header2 A1 B2 Etc
  5. kdjonesmtb2

    How to find position 1421 in a txt file

    I have a text file that is displaying a character of 'm' according to HIPAA compliance editor in postion 1421 However I do not see this character visually in the file How can you write script to display via msgbox what character is in position 1431 in a text file? thanks
  6. kdjonesmtb2

    Attempting to delete folder - receiving error

    Receiving the following error: Path not found Line (681): "objFSO.DeleteFolder strFolderPath, True". If objRadioButton3.checked then msgbox "You have selected the option to delete the files in the archive" Dim Input5 Input5 = InputBox("Input Archive Folder Name to delete") MsgBox...
  7. kdjonesmtb2

    Looking vbscript code that creates a folder name from an input box

    Looking for vbscript code that creates a new folder from the input name entered in an input box This code works but it creates a file not a file folder Dim Input4 Input4 = InputBox("Enter Archive Folder Name") MsgBox ("You entered: " & Input4) If row=1 then Function...
  8. kdjonesmtb2

    Need correct syntax for script that moves all .X12 files to an archive

    Hello I have a script that is generating the follwoing error when it tries to move .X12 files to an archive folder File name example qtptest1.X12 File already exists Line (96): "fso.MoveFile f1,target". However the Target archive folder does not have any files in it. Thanks If...
  9. kdjonesmtb2

    Vbscript code pulls only the last line of a file rather than the whole file

    The vbscript code below pulls the last line of an existing txt file and adds it to new file - I wanted the code to pull all the lines in the exisitng txt file starting from row 2 Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set fso = CreateObject("Scripting.FileSystemObject") Set...
  10. kdjonesmtb2

    Vbscript to append txt file gets a type mismatch error

    This code to append a text file gets a type mismatch error What is correct method to write out "arr" to the txt file Type mismatch: 'qfile1.Write' Line (4064): "qfile1.Write(arr)". Dim arr Set fso = CreateObject("Scripting.FileSystemObject") Set f =...
  11. kdjonesmtb2

    How to copy a txt file starting from a specific row to another txt file?

    Hello, I have script that creates X12 834 Individual Enrollment trx for Health care Each file creates a Header rows that I want to ignore when I combine the files into a single file Only the 1st file should have the header. For example 100 separate files that were created, I want to...
  12. kdjonesmtb2

    Correct syntax for replacing file path with a string in vbscript

    Hello How can I replace the file path in the code below with a string in vbscript Set qfile1=fso.CreateTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP 834\Text files\" & TextFileName,true,False) 'TextFileName used as a variable so that multiple 834 files can be generated from...
  13. kdjonesmtb2

    How to create a loop to avoid explicity defining write file statements

    Hello, The code below pulls data from an excel spreadsheet and writes it to text files I need to be able to take each row of data from the spreadsheet and apply to a unique text file The column data is used for each file but it file should represent a row of data in the excel spreadsheet...
  14. kdjonesmtb2

    Receiving Permission denied error when attempting to append txt file

    Receiving the following error: Permission denied Line (3617): "Set qfile = fso.OpenTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP 834\Text files\qtptest2.x12", ForAppending,True)". Code: Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set...
  15. kdjonesmtb2

    Receiving syntax error when trying to append existing txt file

    Invalid procedure call or argument Line (3616): "Set qfile = fso.OpenTextFile("m:\834 Test\Test files\qtptest2.x12", ForAppending,True)" Set fso=createobject("Scripting.FileSystemObject") Set qfile = fso.OpenTextFile("m:\834 Test\Test files\qtptest2.x12", ForAppending,True)...
  16. kdjonesmtb2

    How to append a text file starting from the last populated row

    How do I add code to append the following text file from the last populated row? Set qfile1=fso.CreateTextFile("\\ikanas267\Documents\kgittensjones\My Documents\QTP 834\Text files\" & TextFileName,true,False) 'TextFileName used as a variable so that multiple 834 files can be generated from...
  17. kdjonesmtb2

    Receiving Unknown runtime error in script - Need to be able to use Excel file to load var or array

    I am using an Excel file to load variables in the vbscript code below I do not think that I have the script set up correctly to load an array that would represent all the columns and rows in the Excel file: The Excel file layout and values are below: I am receiving the following error when I...
  18. kdjonesmtb2

    Syntax error in Excel vbscript

    Hello, I am receiving a syntax error in the following vbscript The test run cannot continue due to a syntax error. Invalid character Line (1): "set objexcel = Createobject(“Excel.Application”)" I would also like to use the fieldvalue variable to populate a text file rather than the...
  19. kdjonesmtb2

    Case statement that will populate a txt file if value is not blank

    I would like perform the following statements that will populate a txt file if variable is not blank This is need as the population of these fields is situational so the datatable may not always have data Thanks Case variable not blank (not sure on syntax)...
  20. kdjonesmtb2

    How to use the len command to count the length of string that has leading zeros

    Hello How do I use the LEN command to count a string that has leading zeros The following string is entered into a datatable as '00 When I run the following CharacterCount = Len(Test2 ) Print CharacterCount I get a returned value of '0' Please advise Thanks

Part and Inventory Search

Back
Top