Hi guys, I have the following macro script, I am facing a situation with a folder that contains many subfolders and inside them there is a lot of files, is there by any chance a possibility to modify this macro so instead of displaying the files inside it only, it displays the files inside it + the files inside the subfolders? Thank you very much.
Sub FetchNames()
Dim myPath As String
Dim myFile As String
myPath = Sheet1.[addr]
myFile = Dir(myPath & "*.*")
r = 5
Do While myFile <> ""
Cells(r, 1).Value = myFile
r = r + 1
myFile = Dir
Loop
End Sub
Sub FetchNames()
Dim myPath As String
Dim myFile As String
myPath = Sheet1.[addr]
myFile = Dir(myPath & "*.*")
r = 5
Do While myFile <> ""
Cells(r, 1).Value = myFile
r = r + 1
myFile = Dir
Loop
End Sub