I have already found the specific files that I need through a bunch of 'If' and 'For' statements meanwhile inside a 'With' statement.
- I now want to open up each file and then cross reference ColumnA with columnB in each worksheet in my current excel file.
- And then list all rows from the lookup files that do not show up in my current excel file. I think I need to do all this within the area where ".open.foundfiles(i)" is located.
Note: The purpose of 'LineCode(j)' (string array) is so that I only grab files with specific codes in their names.
I am fairly new, and this one is REALLY overwhelming me. I hope everything makes sense. Thanks in Advance for any help.
- Hogie
- I now want to open up each file and then cross reference ColumnA with columnB in each worksheet in my current excel file.
- And then list all rows from the lookup files that do not show up in my current excel file. I think I need to do all this within the area where ".open.foundfiles(i)" is located.
Note: The purpose of 'LineCode(j)' (string array) is so that I only grab files with specific codes in their names.
Code:
With Application.FileSearch
.LookIn = Path
For j = 0 To 13
.Filename = "??" & LineCode(j) & "??.xls"
If .Execute() > 0 Then
MsgBox (.FoundFiles.Count)
For i = 1 To .FoundFiles.Count
.Open.FoundFiles (i)
Next i
End If
Next j
End With
I am fairly new, and this one is REALLY overwhelming me. I hope everything makes sense. Thanks in Advance for any help.
- Hogie