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...
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.
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 =...
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...
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...
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...
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...
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...
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...
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...
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!
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.