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 TouchToneTommy 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. Nu2Java

    Copy Excel Columns to New Workbook

    Hi All, I am trying to copy 3 columns from an existing workbook and paste those columns to a NEW workbook, but I am getting errors that the method of PasteSpecial failed. Here is what I have right now, which does seem to create the new workbook and paste the values in, but then fails to save...
  2. Nu2Java

    vbscript remove line from text file if duplicate found

    strongm, this works great! thank you so much for your time helping me with this. The recordset is totally new to me, so I need to dig into it and learn more about it. This is so much simpler and cleaner than what I had.
  3. Nu2Java

    vbscript remove line from text file if duplicate found

    thanks strongm... not sure what I am doing wrong, but when I run this I get values of (-1) for both Total Inspected & Total Passed. This is how I have my code with the changed path and filenames. Maybe I entered something incorrectly Sub FPY() strSearchFor = "4/25/2022" Set myRS =...
  4. Nu2Java

    vbscript remove line from text file if duplicate found

    thanks for the help strongm.. I will remove the delete file section. How do I use what is in the library from your observation (b) when doing the rest of my search? Now that I see you really had no problems, I need to look and see if there is something in there from previous days that is...
  5. Nu2Java

    vbscript remove line from text file if duplicate found

    Hi all.. I have run into a problem here and I am unsure what is causing it. Here is the entire code I am using. When I run just the data file only, the count is correct. When I run it with my additional code, it is missing some serial numbers that I guess it did not accept? Or I must be doing...
  6. Nu2Java

    vbscript remove line from text file if duplicate found

    Thanks to both of you for your help and time. >>> strongm, this is working great! Thanks a lot.
  7. Nu2Java

    vbscript remove line from text file if duplicate found

    Thanks strongm, I will give this a try and report back. mikrom: you are correct, these can be in various orders and also will rarely match a pattern. to give more detail on this, I am going to simply use it to count parts from all of the data by date, but of course I need to exclude duplicates...
  8. Nu2Java

    vbscript remove line from text file if duplicate found

    Hi All, I am using a vbscript file to count lines of data for a specific date. Based on this sample data from my text file, how can I remove lines that contain a duplicate after the first comma? 8-879003-02_TOP,B1021,218,149,4/18/2022 5:37:24 AM 8-879003-02_TOP,B1022,403,80,4/18/2022 6:11:50...
  9. Nu2Java

    Trim filenames in folder from specific character

    I'm lost... not sure how I need to incorporate that into this code.
  10. Nu2Java

    Trim filenames in folder from specific character

    strongm; is there a way to fix that?
  11. Nu2Java

    Trim filenames in folder from specific character

    Strangely, I ran both methods two different times and got a couple filenames that did not change. Maybe one of you can figure out why. 4-961010-02 revE.txt ** UPDATE: This seems to happen just randomly. It will just skip some files for what seems like no apparent reason. After it finishes, I...
  12. Nu2Java

    Trim filenames in folder from specific character

    Thanks strongm, this is another great option that works great.
  13. Nu2Java

    Trim filenames in folder from specific character

    Thanks guitarzan, this works great!
  14. Nu2Java

    Trim filenames in folder from specific character

    I am using this code to trim filenames. I cannot figure out how to expand this to trim ALL files in the folder after the first SPACE from the left in the filename. Before: 41-010 Rev A.txt After: 41-010.txt My Code: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer...
  15. Nu2Java

    Combine text files with conditions

    I have this script for combining text files which works fine, but I have hit a big road block. I have a directory that contains approx 500 text files that I need to combine with a condition. I have many "pairs" of files that are job files where the name is like "JOB-A-TOP" & "JOB-A-BTM". I need...
  16. Nu2Java

    Format Text Files in a Folder

    Wow what a difference. I don't think I would have ever caught that small detail. I think that did it for me... seems to work great. Thanks a lot guitarzan!
  17. Nu2Java

    Format Text Files in a Folder

    guitarzan.. I set the 'msg' variable before the loop and still get the same issue. What I notice is that it appends ALL the files as it reads them. I need it to just clean each file and then remove the duplicates. If I run a single file it works great, so somewhere in the loop its getting messed...
  18. Nu2Java

    Format Text Files in a Folder

    In this code, the remove duplicates is working but I am still writing the same info to all text files that is in the first text file. I think i'm going crazy trying to understand where this is happening. Dim InputFile, inFile, outFile, objFSO, msg, strFile1, strFile2 Dim words(1) Const...
  19. Nu2Java

    Format Text Files in a Folder

    I'm trying to backup a little and use part of the code to only format the text files but I see it's writing the same information to every file based on the first file in the directory. Dim inFile, outFile, objFSO, objFolder, objInFile, InputFile, strFile1, strFile2, msg Const ForReading = 1...
  20. Nu2Java

    Format Text Files in a Folder

    I still get an error on 'strFile1'. Object doesn't support this property or method. Here is the complete code I am using now. I can't seem to find where the error is. Dim InputFile, inFile, outFile, objFSO, msg, strFile1, strFile2 Dim words(1) Const ForReading = 1 Const ForWriting = 2...

Part and Inventory Search

Back
Top