-
Getting filenames of Zipped Folders
Excel will not find any .zip files and search for the name in variable "kerrymatch".
If I rename the files to .txt in the subfolder, it finds them.
Any ideas?
-CompuRob
[VBA] Do While master.Cells(masterRow, 3) <> ""
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '
With Application.FileSearch
.NewSearch
.LookIn = "S:\Kerry\packages\"
.SearchSubFolders = True
.Filename = kerrymatch
.MatchTextExactly = False
.FileType = msoFileTypeAllFiles
If .Execute() <> 0 Then
master.Cells(masterRow, 4).Select
Selection.Interior.ColorIndex = 6
Selection.Pattern = xlSolid
MsgBox ("FOUND")
masterRow = masterRow + 1
kerrymatch = master.Cells(masterRow, 3)
Else
master.Cells(masterRow, 4) = "Not Found"
masterRow = masterRow + 1
kerrymatch = master.Cells(masterRow, 3)
End If
End With
Loop
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules