I want to read the first line from two different report files and assign the dates from each file to separate variables in Excel. They are both comma delimited text files and the dates are enclosed in double-quotes. The dates are the 2nd and 3rd fields in the first line of the files as shown below (the "P" is not needed and can be ignored).
The two file names and folder location will not change so I can hard code those values as the files are overwritten each time a new report file is created. There will always be two dates formatted in MM/DD/YYYY format. I want to assign each of the dates to separate variables for use in my macro, something like: file1a, file1b, file2a, file2b. I tried looking at the Open statement and OpenTextFile method but need some help.
Code:
"P","02/06/2011","02/19/2011"
The two file names and folder location will not change so I can hard code those values as the files are overwritten each time a new report file is created. There will always be two dates formatted in MM/DD/YYYY format. I want to assign each of the dates to separate variables for use in my macro, something like: file1a, file1b, file2a, file2b. I tried looking at the Open statement and OpenTextFile method but need some help.