J
Jim
Hello:
I found this function in the MS Knowledge Base to search for files and print
the results to the Immediate window. It works great, but I need to know how
to put the results in a table. I'm new to vba, so any help is greatly
appreciated.
Jim
Function LocateFile(strFileName As String)
Dim vItem As Variant
Dim strFilePath As String
With Application.FileSearch
.FileName = strFileName
.LookIn = "C:\"
.SearchSubFolders = True
.Execute
For Each vItem In .FoundFiles
Debug.Print vItem
Next vItem
End With
End Function
I found this function in the MS Knowledge Base to search for files and print
the results to the Immediate window. It works great, but I need to know how
to put the results in a table. I'm new to vba, so any help is greatly
appreciated.
Jim
Function LocateFile(strFileName As String)
Dim vItem As Variant
Dim strFilePath As String
With Application.FileSearch
.FileName = strFileName
.LookIn = "C:\"
.SearchSubFolders = True
.Execute
For Each vItem In .FoundFiles
Debug.Print vItem
Next vItem
End With
End Function