Hi everyone,
Debra Dalgleish's Contextures site has a neat bit of code that loops through workbooks in a folder.
Sub AllFolderFiles()
Dim wb As Workbook
Dim TheFile As String
Dim MyPath As String
MyPath = "C:\Temp"
ChDir MyPath
TheFile = Dir("*.xls")
Do While TheFile <> ""
Set wb = Workbooks.Open(MyPath & "\" & TheFile)
MsgBox wb.FullName
wb.Close
TheFile = Dir
Loop
End Sub
What I wanted to do, if possible, is also get it to loop through the subfolders too.
If anyone could help that would be great.
Cheers
Diddy
Bookmarks