I have created a macro that opens all spreadsheets in a folder and pulls the data I need from them. I need the macro to open all spreadsheets in all subfolders of the directory. Below is the code I'm using, but I need it to look through each subfolder under "Files". For example there is a 54, 55, and 56 folder each with multiple spreadsheets in it that I need data from.
FolderPath = "H:\Daniel\Files\54\"
FileName = Dir(FolderPath & "*.xl*")
Do While FileName <> ""
Set WorkBk = Workbooks.Open(FolderPath & FileName)
This is where all the code is to grab the data I need.
ActiveWorkbook.Close (False)
FileName = Dir()
Loop
Thanks, Trina