J
JustinP
I need to search for files with the extensions "*.mxd" and "*.wor". How
can I do this using the code below with duplicating it all?
Sub FindFiles()
Dim i As Long
With Application.FileSearch
.SearchSubFolders = True
.LookIn = "C:\"
.Filename = "*.mxd"
.FileType = msoFileTypeAllFiles
.Execute
For i = 1 To .FoundFiles.Count
Range("A" & i) = .FoundFiles(i)
Next
End With
End Sub
can I do this using the code below with duplicating it all?
Sub FindFiles()
Dim i As Long
With Application.FileSearch
.SearchSubFolders = True
.LookIn = "C:\"
.Filename = "*.mxd"
.FileType = msoFileTypeAllFiles
.Execute
For i = 1 To .FoundFiles.Count
Range("A" & i) = .FoundFiles(i)
Next
End With
End Sub